defaultValue 屬性可設(shè)置或返回密碼域的默認(rèn)值。
注釋:該默認(rèn)值是在 HTML "value" 屬性中規(guī)定的默認(rèn)值。
passwordObject.defaultValue=somevalue
下面的例子可獲得密碼域的默認(rèn)值:
<html>
<head>
<script type="text/javascript">
function alertValue()
{
alert(document.getElementById("password1").defaultValue
)
}
</script>
</head>
<body>
<form>
<input type="password" id="password1" value="thgrt456" />
<input type="button" id="button1" onclick="alertValue()"
value="Show default value" />
</form>
</body>
</html>
如對本文有疑問,請?zhí)峤坏浇涣髡搲?,廣大熱心網(wǎng)友會為你解答??! 點擊進(jìn)入論壇
Powered by 365建站網(wǎng) RSS地圖 HTML地圖
copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號