JS、jqueryie6浏览器下使用js无法提交表单的解决办法

时间:2023-12-13 22:02:08

-----------------------JS、jqueryie6浏览器下使用js无法提交表单的解决办法--------------------------------------------------

----------------jsp----------------------------------------------------------------------------

<form action="" id="frmmsgBoardCheck" method="post">

<a class="anextpage" href="javascript:formSub()">测试</a>

</form>

-----------------js----------------------------------------------------------------------------

function formSub(){

var url = "userInfoMgrAction!getUserInfo";

document.getElementById("frmmsgBoardCheck").setAttribute("action", url);

document.getElementById("frmmsgBoardCheck").submit();

}