背景说明:
1、当在文本框中输入完数据后直接按回车,然后用在JS中捕获事件再做相应处理;
示例:
<script language="javascript">
function test(){
if (event.keyCode == 13){
alert("捕捉住回车提交事件!");
}
}</script>
<form method="post">标题:<input type="text" name="t" onkeydown="test();"/></form>