function ajax()
{
var xmlhttp=createXMLHttp();
this.url_str='';//php后台文件
this.div_id='';//加载的图层id
this.str='';//传送的数据
var that=this;
this.cc=function()
{
xmlhttp.onreadystatechange=function ()
{
if(xmlhttp.readyState==4)
{
document.getElementById(that.div_id).innerHTML=xmlhttp.responseText;
document.getElementById("newDrag").style.display="block";
bu_re_change();//注意这边 bu_re_change()放在这里有效 标号1
}
}
xmlhttp.open('POST',this.url_str,true);
xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlhttp.send(this.str);
}
}function character_ajax(user_id,type)
{
css_change('character');
var aa=new ajax();
aa.url_str='character.php';
aa.div_id="newBody";
aa.str="user_id="+user_id
aa.cc();
}
ajax.prototype.ccc=function()
{
bu_re_change(); //bu_re_change()放在这里没有效果呢 标号2
}
bu_re_change();实现的是按钮变换和隐藏效果
为什么标号1能实现 而标号2不能呢 如果我一定要放在标号2位置 标号1去掉 那要怎么做 求救了
{
var xmlhttp=createXMLHttp();
this.url_str='';//php后台文件
this.div_id='';//加载的图层id
this.str='';//传送的数据
var that=this;
this.cc=function()
{
xmlhttp.onreadystatechange=function ()
{
if(xmlhttp.readyState==4)
{
document.getElementById(that.div_id).innerHTML=xmlhttp.responseText;
document.getElementById("newDrag").style.display="block";
bu_re_change();//注意这边 bu_re_change()放在这里有效 标号1
}
}
xmlhttp.open('POST',this.url_str,true);
xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlhttp.send(this.str);
}
}function character_ajax(user_id,type)
{
css_change('character');
var aa=new ajax();
aa.url_str='character.php';
aa.div_id="newBody";
aa.str="user_id="+user_id
aa.cc();
}
ajax.prototype.ccc=function()
{
bu_re_change(); //bu_re_change()放在这里没有效果呢 标号2
}
bu_re_change();实现的是按钮变换和隐藏效果
为什么标号1能实现 而标号2不能呢 如果我一定要放在标号2位置 标号1去掉 那要怎么做 求救了
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货