HTML DOM size ÊôÐÔ
¶¨ÒåºÍÓ÷¨
size ÊôÐÔ¿ÉÉèÖûò·µ»ØÃÜÂëÓòµÄ´óС£¨ÒÔ×Ö·ûÊý¼Æ£©¡£
Óï·¨
passwordObject.size=number_of_chars
ʵÀý
ÏÂÃæµÄÀý×Ó¸ü¸ÄÁËÃÜÂëÓòµÄ´óС£º
<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>