日期:2014-05-17  浏览次数:20813 次

javascript光标显示
<!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= " ">
</HEAD>

<BODY>
<form   name= "myform ">
<INPUT   TYPE= "text "   NAME= "userid "   value= "test "   onclick= "javascript:document.myform.userid.select();document.myform.userid.value= ' ';document.myform.userid.focus(); ">
</form>
</BODY>
</HTML>
我想点击过userid后光标依然在文本框显示。谢谢

------解决方案--------------------
<!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= " ">
</HEAD>

<BODY>
<form name= "myform ">
<INPUT TYPE= "text " NAME= "userid " value= "test " onclick= "javascript:this.value= ' ';this.focus(); ">
</form>
</BODY>
</HTML>