62,268
社区成员
发帖
与我相关
我的任务
分享
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.RowIndex == 0)
{
e.Row.FindControl("Text的id").Focus();
}
}
}
<html>
<head><title></title></head>
<body onload="document.getElementById('txt1').focus();">
<textarea id="txt1"></textarea>
</body>
</html>