HTML DOM size 屬性
定義和用法
size 屬性可設(shè)置或返回密碼域的大。ㄒ宰址麛(shù)計(jì))。
語(yǔ)法
passwordObject.size=number_of_chars
實(shí)例
下面的例子更改了密碼域的大小:
<html>
<head>
<script type="text/javascript">
function changeSize()
{
document.getElementById("password1").size=40
}
</script>
</head>
<body>
<form>
<input type="password" id="password1" />
<input type="button" id="button1" onclick="changeSize()"
value="Change size of the password field" />
</form>
</body>
</html>