如何让按钮执行两个JS文件函数?

来源:百度知道 编辑:UC知道 时间:2024/07/02 14:28:26
<FORM id=cardForm onsubmit="return submitForm();"
action=login_box.htm method=post
AUTOCOMPLETE="off"><INPUT id=MPDSID type=hidden name=MPDSID>

return submitForm是检查数字长度的,我想检查完再运行

<script language="javascript">

var ll = document.getElementById("login");
ll.href ="javascript:openLogin('" + location.href + "')";
</script>

里面的javascript:openLogin

有什么方法吗?谢谢~

<FORM id=cardForm onsubmit="submitForm();submitForm2();" action=login_box.htm method=post
AUTOCOMPLETE="off"><INPUT id=MPDSID type=hidden name=MPDSID>

这样可以

function submitForm()
{
if(document.cardForm.MPDSID.value=='')
{
alert('不能为空');
return false;
}
return true;
}

第二个不太清楚,没用过,