return不适用于pagemethods

return doesnot work with pagemethods

本文关键字:pagemethods 适用于 不适用 return      更新时间:2023-09-26

我想知道如何使用page方法返回值。下面的代码给我错误

function main()
{
PageMethods.custref(ddlpf.options[ddlpf.selectedIndex].value,custref1.value,custSuc,custErr);
function custSuc(boo)
{
if(boo==true)
{message("Cust ref already exists");btn_enable(false);make_null();return;}
}
function custErr(){}
Pagemethods.set("true",suc,err);
function suc(res){//code}
function err(){}
}

我的问题甚至是显示的消息,"set"pagemethod正在工作

将其更改为以下

function main()
{
PageMethods.custref(ddlpf.options[ddlpf.selectedIndex].value,custref1.value,custSuc,custErr);
function custSuc(boo)
{
if(boo==true)
{message("Cust ref already exists");btn_enable(false);make_null();return;}
Pagemethods.set("true",suc,err);
function suc(res){//code}
function err(){}
}
function custErr(){}
}