当前位置: 代码迷 >> ASP >> javascript光标显示解决办法
  详细解决方案

javascript光标显示解决办法

热度:94   发布时间:2012-02-20 21:18:24.0
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>
  相关解决方案