HTML DOM name ÊôÐÔ
¶¨ÒåºÍÓ÷¨
name ÊôÐÔÉèÖûò·µ»Ø textarea µÄÃû³Æ¡£
Óï·¨
textareaObject.name=text
ʵÀý
±¾ÀýÉèÖà textarea µÄÃû³Æ£º
<html>
<head>
<script type="text/javascript">
function alertName()
{
alert(document.getElementById('txt1').name);
}
</script>
</head>
<body>
<textarea id="txt1" name="textarea1">
Hello world....This is a text area
</textarea>
<br />
<input type="button" onclick="alertName()" value="Alert name" />
</body>
</html>