日期:2014-05-16  浏览次数:20350 次

请教:参数无效
function check()
 {
 

  var uname=document.form1.uname.value; //alert(uname);

  //////////////没有认证过的用户先鉴协议////////////////////////////
var res1 = postData("get.php", "post", "uname="+uname);

if(res1 != "1")
{

window.open("agree.php?uname="+uname,"协议","width=500,height=800");//这行引号写错了?老提示参数无效
return false;
}
else{

do();
return;

}
///////////////////////////////////////////////////////////////
 
 }

------解决方案--------------------
window.open("agree.php?uname="+uname,"协议","width=500,height=800");


改成

window.open("agree.php?uname="+uname,"协议","width=500","height=800");
------解决方案--------------------
语法 :oNewWindow = window.open( [sURL] [, sName] [, sFeatures] [, bReplace])

window.open("agree.php?uname="+uname,"协议","width=500,height=800");
初步判断是中文问题。

------解决方案--------------------
探讨

语法 :oNewWindow = window.open( [sURL] [, sName] [, sFeatures] [, bReplace])

window.open("agree.php?uname="+uname,"协议","width=500,height=800");
初步判断是中文问题。

------解决方案--------------------
form1有定义?uname有定义?如果forme1和uname是页面上forme的id或者name的话,在IE下这么调用好像没问题,但是在其他浏览器下会报这两个变量未定义