Having fun with IE - part 1: getAttribute()

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

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 11-'06 Beware of premature optimization

Comments

Comments are closed