Firefox will tell you "INPUT", but IE "FORM".
<SCRIPT language="javascript">
function checkFoo() {
var fooNode = document.getElementById("foo");
alert(fooNode.tagName);
}
</SCRIPT>
<FORM name="foo">
Name : <INPUT type="text" id="foo">
<INPUT TYPE="button" onClick="checkFoo()" value="Get Foo Node">
</FORM>
No comments:
Post a Comment