HTML DOM form ÊôÐÔ
¶¨ÒåºÍÓ÷¨
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>