Having fun with IE - part 1: getAttribute()

By crisp on Sunday 26 November 2006 13:04
Category: Browsers, Views: 748

The start of a series of funny and not-so-funny IE-bugs; today: DOM attribute handling colliding with the document.all object-model.


HTML:
1
2
3
4
5
6
7
8
9
<form id="foo" action="#">
    <fieldset>
        <legend>Example</legend>
        <input type="text" name="action" value="whatever">
    </fieldset>
</form>
<script type="text/javascript">
    alert(document.forms['foo'].getAttribute('action')); // [object] ?
</script>


Are you laughing yet?

Volgende: Beware of premature optimization 28-11

Comments

There are no comments for this post


Comment form
(required)
(required, but will not be displayed)
(optional)

Please enter the characters you see in the image below: