function pageLoad(sender,eventArgs)
{
document.onkeypress=function(){
if(event.keyCode==13)
return false;
}
}
{
document.onkeypress=function(){
if(event.keyCode==13)
return false;
}
}
如果没有加载MicrosoftAjax框架,请添加document的onload事件。欢迎提出疑问,感谢!
上面的也禁止了文本区域的回车,最好用下面的方法
document.forms[0].onsubmit=function(){
return false;
}
然后利用__doPostBack()提交
return false;
}