大侠帮我看看代码为啥报错。
function showPre()
{
var res=window.showModalDialog("SelectPreContact.aspx","newWindow","DialogHeight=3000px;dialogWidth:620px;status:no;scrollbars:auto;Resizable=no;");
alert(res);
if(res != null)
{
var arr=res.split(",");//提示运行时间错误,缺少; for(int i = 0;i<arr.length;i+=2)
{
var opt=document.createElement("option"); opt.innerValue=arr[i+1];
opt.innerText=arr[i]; document.getElementById('lstbPreContract').appendChild(opt);
}
}
}
function showPre()
{
var res=window.showModalDialog("SelectPreContact.aspx","newWindow","DialogHeight=3000px;dialogWidth:620px;status:no;scrollbars:auto;Resizable=no;");
alert(res);
if(res != null)
{
var arr=res.split(",");//提示运行时间错误,缺少; for(int i = 0;i<arr.length;i+=2)
{
var opt=document.createElement("option"); opt.innerValue=arr[i+1];
opt.innerText=arr[i]; document.getElementById('lstbPreContract').appendChild(opt);
}
}
}
SelectPreContact.aspx设置没 window.returnValue ???
for(var i = 0;i<arr.length;i+=2)
split方法里面应该是单引号吧