HTML DOM name ÊôÐÔ
¶¨ÒåºÍÓ÷¨
length ÊôÐÔ¿ÉÉèÖûò·µ»Ø±íµ¥µÄÃû³Æ¡£
Óï·¨
formObject.name=formname
ʵÀý
ÏÂÃæµÄÀý×Ó¿É·µ»Ø±íµ¥µÄÃû³Æ£º
<html>
<body>
<form id="myForm" method="get" name="myForm">
Name: <input type="text" size="20" value="Peter Griffin" />
</form>
<script type="text/javascript">
document.write("Form name: ");
document.write(document.getElementById('myForm').name
);
</script>
</body>
</html>