<script language="JavaScript" type="text/javascript" >
function check(){
myform.submit();
}
</script>
<form action="" method="post" name="myform">
<table>
<tr><td>用户名:</td><td><input type="text" name="name"/></td></tr>
<tr><td>密码:</td><td><input type="password" name="pw"/></td></tr>
</table>
<input type="button" name="submit" value="确定" onclick="check()"/>
</form>
function check(){
myform.submit();
}
</script>
<form action="" method="post" name="myform">
<table>
<tr><td>用户名:</td><td><input type="text" name="name"/></td></tr>
<tr><td>密码:</td><td><input type="password" name="pw"/></td></tr>
</table>
<input type="button" name="submit" value="确定" onclick="check()"/>
</form>
function check(){
alert('check');
//this.submit();
//使用ajax提交
}
</script>
<form action="" method="post" name="myform">
<table>
<tr><td>用户名:</td><td><input type="text" name="name"/></td></tr>
<tr><td>密码:</td><td><input type="password" name="pw"/></td></tr>
</table>
<input type="button" name="submit" value="确定" onclick="check()"/>
</form>
http://belinlove.sinaapp.com/post-23.html
function check(){
$("#myform").submit();
}
</script>
<form action="" method="post" name="myform">
<table>
<tr><td>用户名:</td><td><input type="text" name="name"/></td></tr>
<tr><td>密码:</td><td><input type="password" name="pw"/></td></tr>
</table>
<input type="button" name="submit" value="确定" onclick="check()"/>
</form>
<script language="JavaScript" type="text/javascript" >
function check(){
document.getElementById('myform').submit();
}
</script>
<form action="index.php" method="post" id="myform">
<table>
<tr><td>用户名:</td><td><input type="text" name="name"/></td></tr>
<tr><td>密码:</td><td><input type="password" name="pw"/></td></tr>
</table>
<input type="button" name="hel" value="确定" onclick="check()"/>
</form> 将myform.submit();改为document.getElementById('myform').submit();
将name="myform"改为id="myform"
将name="submit"改为name="hel",hel可以是任意名字,但不要用submit