form 屬性返回對包含該 text area 的 表單的引用。
若成功,則該屬性返回一個 form 對象。
textareaObject.form
本例返回 text area 所屬的表單的 id:
<html>
<body>
<form id="form1">
<textarea id="txt1">
Hello world....This is a text area
</textarea>
</form>
<p>The id of the form containing the text area is:
<script type="text/javascript">
x=document.getElementById('txt1');
document.write(x.form.id
);
</script>
</p>
</body>
</html>
如對本文有疑問,請?zhí)峤坏浇涣髡搲?,廣大熱心網(wǎng)友會為你解答??! 點擊進入論壇
Powered by 365建站網(wǎng) RSS地圖 HTML地圖
copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號