HTML DOM name ÊôÐÔ

¶¨ÒåºÍÓ÷¨

name ÊôÐÔ¿ÉÉèÖûò·µ»Ø checkbox µÄÃû³Æ¡£

Óï·¨

checkboxObject.name=name

ʵÀý

ÏÂÃæµÄÀý×Ó¿ÉÊä³ö checkbox µÄÃû³Æ£º

<html>
<body>

<form>
<input type="checkbox" id="check1" name="check1" />
</form>

<p>The name of the checkbox is:
<script type="text/javascript">
document.write(document.getElementById("check1").name)
</script>
</p>

</body>
</html>
VUE