密碼框顯示提示文字

<html>
<head></head>
<body>
<div>
<input type="text" value="密碼" onfocus="if(this.value==defaultValue) {this.value='';this.type='password'}" onblur="if(!value) {value=defaultValue; this.type='text';}" style="color:#666;" />
</div>
</body>
</html>html

 

默認狀態下this

獲取焦點後htm

相關文章
相關標籤/搜索