开发者

how to set action attribute of the html:form according to javascript conditions written below

 function setReqcode(id,methodName){

    if(document.getElementById('approve').value==id)
    {
        alert("inside approve"+methodName);
        action="ProcessPath.do?reqCode=approveVersion";
    }

    if(document.getElementById('reject').value==id)
    {
        alert("inside reject"+methodName);
        action="ProcessPath.do?reqCode=rejectVersion"
    }
}

i have to change the html:form action attribute according to if c开发者_开发知识库ondition. so please suggest some solution with example.


formReference.setAttribute('action', 'blah') 

or

formRef.action='foo'

should suffice.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜