HTML DOM id ÊôÐÔ
¶¨ÒåºÍÓ÷¨
id ÊôÐÔ¿ÉÉèÖûò·µ»Øµ¥Ñ¡°´Å¥µÄ id¡£
Óï·¨
radioObject.id=id
ʵÀý
ÏÂÃæµÄÀý×Ó¿ÉÌáʾ³öµ¥Ñ¡°´Å¥µÄ id£º
<html>
<body>
<form>
<input type="radio" id="radio1" />
</form>
<p>The id of the radio button is:
<script type="text/javascript">
x=document.getElementById('radio1');
document.write(x.id
);
</script>
</p>
</body>
</html>