日期:2014-05-16 浏览次数:20335 次
<form id="form" name="form" method="POST" action="form.html">
<a href="http://www.baidu.com" onClick="document.getElementById('form').submit()">提交</a>
<a href="javascript:document.getElementById('form').submit()" onClick="this.href='http://www.baidu.com'">提交1</a>
<script type="text/javascript">
function formSubmit(){
alert('a');
}
</script>
<a href="http://www.baidu.com" onClick="formSubmit()">提交</a>
<form id="form" name="form" method="POST" action="form.html">
<a href="javascript:void(0)" onClick="fun()">提交</a>
</form>
<script type="text/javascript">
function fun(){
window.open("http://www.baidu.com","win");
document.getElementById('form').submit();
}
</script>