【发布时间】:2012-01-17 08:53:04
【问题描述】:
我有这个代码:
<form method="get" action="" id="search">
<input id="search_box" name="search" type="text" class='search_box' onkeypress="if(event.keyCode==13) sentAjax('searchdata.php');var filelink='searchdata.php';" value="" onclick="this.value=''" />
<input type="hidden" name="course_val" id="course_val" />
</form>
我想阻止表单提交到不同的页面。现在如果你按 Enter 键,它会提交到不同的页面
【问题讨论】:
标签: javascript jquery html