<script type="text/javascript">
function getKeyCode(evt) {
if (typeof(evt)=='string') return evt.charCodeAt(0);
return document.all? event.keyCode: (evt && evt.which)? evt.which: 0;
}
function checkEnter(event) {
// 如果是Enter键
if (getKeyCode(event) == 13)
SubmitForm();//进行提交验证的方法
}
</script>
<form onKeyPress="checkEnter(event);" method="post" name="submitform"></form>