表单默认提交目标页为:dacxsq.htm
With .Add("btn7", "授权", "submit")
.Attribute = "on click='myfunction()'"
End With
现计划增加以下按钮,设置不同目标页,并触发不同JS函数
With .Add("btn8", "下载", "submit")
.Attribute = "on click='myfunction2()'" ’不触发此JS函数
.FormAction = "download.htm" '测试时,能够正常提交至此目标页
End With
麻烦老师帮忙解决一下,谢谢!
JS代码如下:
function myfunction(){
var result = submitAjaxForm('form1','',false);
if (result.substring(0,2) =='OK') {
{showDialog('dlg3','提示',result.substring(2))}
}
else if (result.substring(0,2) =='QR')
{
{showDialog('dlg1','提示',result.substring(2))}
}
else {showDialog('dlg2','错误',result)}
}
function myfunction2(){
var result = submitAjaxForm('form2','',false);
if (result.substring(0,2) =='OK') {
{showDialog('dlg4','提示',result.substring(2))}
}
else {showDialog('dlg2','错误',result)}
}
[此贴子已经被作者于2022/9/29 12:01:32编辑过]