HTML DOM disabled 屬性
定義和用法
form 屬性可返回對(duì)包含該密碼域的表單的引用。
若成功,該屬性將返回一個(gè)表單對(duì)象。
語(yǔ)法
passwordObject.form
實(shí)例
下面的例子取得了該密碼域所屬的表單的 id:
<html>
<body>
<form id="form1">
<input type="password" id="password1" />
</form>
<p>The id of the form containing the password field is:
<script type="text/javascript">
x=document.getElementById('password1');
document.write(x.form.id
);
</script></p>
</body>
</html>