前台
function GetFocus()
{
if(event.keyCode==13)
{
document.getElementById("Button1").click();
return false;
}
}
------------------------
后台
TextBox1.Attributes.Add("onkeydown","return GetFocus();");
前台
function GetFocus()
{
if(event.keyCode==13)
{
document.getElementById("Button1").click();
return false;
}
}
------------------------
后台
TextBox1.Attributes.Add("onkeydown","return GetFocus();");
转载于:https://www.cnblogs.com/coolylh/archive/2006/08/14/476439.html