页面事件的控制

1.设置默认焦点

ASP.NET1.1中设置方法:

<body onload="document.getElementById('TextBox1').focus();">
<body onkeydown="document.all('TextBox1').focus();">

ASP.NET2.0中设置方法:

<form id="Form1" method="post" runat="server" defaultfocus="TextBox2" defaultbutton="btnOK">

原文地址:https://www.cnblogs.com/KingStar/p/1601566.html