中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

Password defaultValue 屬性

Password 對(duì)象參考手冊(cè) Password 對(duì)象

定義和用法

defaultValue 屬性可設(shè)置或返回密碼域的默認(rèn)值。

注意: 該默認(rèn)值是在 HTML "value" 屬性中規(guī)定的默認(rèn)值。

語(yǔ)法

設(shè)置 defaultValue 屬性:

passwordObject.defaultValue="value"

返回 defaultValue 屬性:

passwordObject.defaultValue

瀏覽器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

所有主要瀏覽器都支持 defaultValue 屬性


實(shí)例

實(shí)例

下面的例子可獲得密碼域的默認(rèn)值:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script>
function displayResult(){
????var x=document.getElementById("pwd").defaultValue;
????alert(x);
}
</script>
</head>
<body>

<form>
密碼: <input type="password" id="pwd" value="thgrt456">
</form>
<button type="button" onclick="displayResult()">顯示默認(rèn)值</button>

</body>
</html>

運(yùn)行代碼 ?

Password 對(duì)象參考手冊(cè) Password 對(duì)象其他擴(kuò)展