日期:2014-05-20  浏览次数:20403 次

高手帮忙看看js,马上结帐
后台
Me.btnOk.Attributes.Add( "onclick ",   "myMethod(); ")

前台
function   myMethod()
{
if   (confirm(OK?))
    rightValue();
else
    return;
}

function   rightValue()
{
var   potlists= " ";
for   (ix=0;ix <frmDoorUpdate.lstBoxRight.length;ix++)
}
调试了几小时,怎么都跳不出确认对话筐来,哭啊


------解决方案--------------------
if (confirm( "OK? "))

改成这个试试看
------解决方案--------------------
后台
Me.btnOk.Attributes.Add( "onclick ", "return myMethod(); ")

前台
function myMethod()
{
if (return confirm(OK?))
rightValue();
else
return;
}
------解决方案--------------------
for (ix=0;ix <frmDoorUpdate.lstBoxRight.length;ix++)
这里怎么没有语句,怎么执行
------解决方案--------------------
Me.btnOk.Attributes.Add( "onclick ", "myMethod() ");

前台
function myMethod()
{
if (confirm( "OK? "))
alert( "111 ");
else
alert( "222 ");
}
这种测试可以,相应的改下代码
------解决方案--------------------
for (ix=0;ix <frmDoorUpdate.lstBoxRight.length;ix++)
这里你改成
for (ix=0;ix <frmDoorUpdate.lstBoxRight.length;ix++)
{
potlists+=1;
}
再试试能不能弹出.能弹出,你再去把你的代码修改成正确定表达式
------解决方案--------------------
Me.btnOk.Attribute.Add( "OnClick ", "return myMethod() ")
if(confirm( "OK? "))
{
rightValue();
return true;
}else{
return false;
}