我检查了我的ASP服务器端,但是当我有以下代码时。我无法获得返回虚假工作?任何人都可以帮助我帮忙
if Ubound(arr) < 0 then
response.write "<script language='javascript'>"
response.write "if (confirm(""Emptying the selected box will delete the Holiday Calendar Code"")==0)"
response.write " {return false;}"
response.write "</script>"
end if
答案 0 :(得分:0)
要使确认框返回false,请尝试以下操作:
if Ubound(arr) < 0 then
response.write "<script language='javascript'>"
response.write "if ( ! confirm(""Emptying the selected box will delete the Holiday Calendar Code"") )"
response.write " {return false;}"
response.write "</script>"
end if
但是,它不会停止任何页面加载。服务器端代码始终在任何客户端代码之前执行,因此添加确认框在此处无法正常工作。你到底想要完成什么?