HTML onfocus
<!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>
<input type="text" value="请输入密码"/>
<div><input type="text" value="请输入密码" onfocus="this.parentNode.innerHTML='<INPUT type=password value=>';" /></div>
<input type="text" value="请输入密码"/>
</BODY>
</HTML>