var _str = {};
/*
s1:第一个字符串
e1:true时 包含s1的长度
s2:第二个字符串
e2:true时 包含s2的长度
*/
//_str.get(s, "截取", 0, "字符", 1);
_str.get = function(str, s1, e1, s2, e2) {
this.bx = 0
this.bx = this.find(str, s1, e1)
return this.sub(str,this.bx , this.find(str, s2, e2));
};
_str.sub = function(s, m, n) { return s.substr(m, n-m) };
//len 是否包含搜索字符串的长度
_str.find = function(s, str, len) {
var i = s.indexOf(str,this.bx);
return i == -1 ? false : (len ? i+str.length : i);
};
//
System.useCodepage = true;
this.createTextField("t_txt", 0, 0, 0, Stage.width, Stage.height);
t_txt.wordWrap = true;
t_txt.multiline = true;
t_txt.html = true
init()
function init(){
var url:String = "http://www.ip138.com/ips8.asp";
var p_lv:LoadVars = new LoadVars();
var t_lv:LoadVars = new LoadVars();
p_lv.ip = "www.2.com";
p_lv.action = "2";
p_lv.sendAndLoad(url, t_lv, "POST");
t_lv.onData = function(data) {
t_txt.htmlText = _str.get(data,'',1,'',0)+"
"+_str.get(data,'