我晕了,JS脚本老是提示没有对象
在母页,使用下函数调出mypath.aspx
function mypath()
{
var strflow=window.showModalDialog( "mypath.aspx ", " ", "status=no,center=yes,scroll=no,resizable=no,help=no,dialogWidth=640,dialogHeight=480 ");
document.getElementById( "btnsave ").value=strflow;
}
在调用页mypath.aspx中,执行其中的任意函数都是提示没有对象,求救啊
<script type= "text/javascript ">
function insert(flag)
{
var flow=document.getElementById( "lblFlow ").value;
var path=new Array();
if (flow!= " ")
{
path= flow.split( ", ");
}
var strstep=window.showModalDialog( "selectstep.aspx ", " ", "status:no;center:yes;scroll:no;resizable:no;help:no;dialogWidth:640px;dialogHeight:480px ");
for(i=flag,i++)
{
path[i+1]=path[i];
path[i]=strstep;
}
}
function del(flag)
{
var flow=document.getElementById( "lblFlow ").value;
var path=new Array();
if (flow!= " ")
{
path= flow.split( ", ");
}
for(i=flag,i++)
{
path[i]=path[i+];
}
document.getElementById( "lblFlow ").value=path;
}
function flowok()
{
var flow=document.getElementById( "lblFlow ").value;
window.returnValue=flow;
window.close();
}
function flowcancel()
{
window.returnValue= " ";
window.close();
}
</script>
------解决方案--------------------提示什么地方缺少对象?你这么说没有办法解决问题,在你认为可能缺少对象的地方都alert(xxx),看看是不是空
------解决方案--------------------for(int i=flag;;i++)
{
path[i+1]=path[i];
path[flag]=strstep;
}
改成
for(i=flag;;i++)
{
path[i+1]=path[i];
path[flag]=strstep;
}
看看