文本框內(nèi)默認值
如何令文本框內(nèi)出現(xiàn)灰色字體,鼠標點擊文本框后自動消失,同時密碼那個顯示請輸入密碼
<!DOCTYPE?HTML><html><head><meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"><title>表單標簽</title></head><body><form?method="post"?action="save.php">??????????<label?for="username">用戶名:</label>??????<input?type="text"??name="username"?id="username"?value="請?zhí)顚懹脩裘??/>??????<br>??????<label?for="pass">密   碼:</label>??????<input?type="password"??name="pass"?id="pass"?value="test"?/>????????<br>??????<input?type="submit"?value="確定"??name="submit"?/>??????<input?type="reset"?value="重置"?name="reset"?/></form>??</body></html>
2018-07-25
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>無標題文檔</title>
</head>
<body>
<form method="post" action="save.php">? ? ? ? ?
? ? <label for="username">用戶名:</label>? ? ??
? ? <input type="text"? name="username" id="username" value="" placeholder="請輸入用戶名" />
? ? <br>? ? ??
? ? <label for="pass">密   碼:</label>? ? ?
? ? <input type="password"? name="pass" id="pass" value="" placeholder="輸入密碼"/>?
? ? <br>? ? ??
? ? <input type="submit" value="確定"? name="submit" />??
? ? <input type="reset" value="重置" name="reset" />
</form>
</html>
小白我只會這個,點擊時文本消失還不知道用什么實現(xiàn)
2018-07-25
當文本框獲取到焦點的時候,清空文本框,同時密碼框重新賦值