05-11-2012, 21:05
(Ten post był ostatnio modyfikowany: 05-11-2012, 21:35 przez Kartofelek.)
Nie wiedziałem tego. Muszę poczytać o tym :}
Co ciekawe:
Dobra poczytałem.
http://javascript.info/tutorial/searching-elements-dom
To jest nic.
Popatrzcie lepiej na pkt 2
In Internet Explorer that may lead to errors, see the example below.
If you run it in IE, it won’t work. Line (x) is erroneous, because:
1 a references the DIV (it’s ok).
2 IE-generated referenes can’t be overwritten (ah, bad bad!).
Co ciekawe:
Kod:
<a href="sssss" id="test">pppp</a>
<script type="text/javascript">
alert(test); //adres linka
alert(window.test); //undefined
</script>
Dobra poczytałem.
http://javascript.info/tutorial/searching-elements-dom
To jest nic.
Popatrzcie lepiej na pkt 2
In Internet Explorer that may lead to errors, see the example below.
Kod:
<div id="a">test</div>
<script>
a = 5 // (x)
alert(a)
</script>
If you run it in IE, it won’t work. Line (x) is erroneous, because:
1 a references the DIV (it’s ok).
2 IE-generated referenes can’t be overwritten (ah, bad bad!).