关于JSP的问题,我想在进入JSP页面时就将光标定位到指定的文本框中,代码如何写!
2个回答
展开全部
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript">
<!--
function setfocus()
{
txt.focus();
}
//-->
</SCRIPT>
</HEAD>
<BODY onload="setfocus()">
<INPUT TYPE="text" NAME="txt">
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript">
<!--
function setfocus()
{
txt.focus();
}
//-->
</SCRIPT>
</HEAD>
<BODY onload="setfocus()">
<INPUT TYPE="text" NAME="txt">
</BODY>
</HTML>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询