![]() |
# 1 |
חבר וותיק
|
בעיה עם getElemetById
טוב אז ככה כתבתי את הקוד הנ"ל
HTML קוד:
<script> var i = 0; function bop(){ if(i==0){ bla.innerText="olleH" i++ } else{ bla.innerText="Hello" i-- } } </script> <p id="bla" width="100px"> Hello </p> <input type="button" value="Cilck on me and see what happends" id="bn1" class="bn" onclick="bop()" width="100px" /> HTML קוד:
<script> var i = 0; function bop(){ var x = document.getElemetById("bla") if(i==0){ x.innerText="olleH" i++ } else{ x.innerText="Hello" i-- } } </script> <p id="bla" width="100px"> Hello </p> <input type="button" value="Cilck on me and see what happends" id="bn1" class="bn" onclick="bop()" width="100px" /> ![]() תודה מראש |
![]() |
חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים) | |
|
|