如何DoDelete(Delete)中的Delete文本值传到DoDelete方法,报错信息为:Delete未定义!

 

 

<head>

...

//删除

function DoDelete(flag)

{

GetItemId(flag);

}

 

function GetItemId(flag)

{

var items = Co["DispDataList"].GetSelected();

var sid = "";

if (items.length == 0) {

alert(WARNINGSTRING);

return;

}

else {

sid = items[0].GetAttr("Id");

}

var fType = (flag == "Modify") ? "Modify" : "Delete";

LinkTo("PosEdit.aspx?FuncType=" + fType + "&Id=" + sid,BLANK,WINDOWSSIZE);

}

..

</head>

<form>

....                                            //解决用单引号传值

<button id="btnAdd" onclick="DoDelete('Delete')" type="button"

 

jctype="jcbutton">添加</button>

....

</form>

 

posted @ 2006-04-12 09:49  RicoRui  阅读(531)  评论(0编辑  收藏  举报