Witam,
mam taki nietypowy problem, muszę uzyskać efekt identyczny jak tu tyle, że w samym JS :/ Ktoś ma pomysł jak mogę to zrobić ?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.did"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl-PL" lang="pl-PL"> <head> <script type="text/javascript"> function qwerty(text){ document.getElementById('qqq').innerHTML += 'Clicked: ' + text; } </script> </head> <body> <input type="button" value="1" onclick="qwerty(this.value)" /> <input type="button" value="2" onclick="qwerty(this.value)" /> <input type="button" value="3" onclick="qwerty(this.value)" /> </body> </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.did"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl-PL" lang="pl-PL"> <head> <script type="text/javascript"> function qwerty(text){ document.getElementById('qqq').innerHTML += 'Clicked: ' + text; } </script> </head> <body> <input type="button" value="1" onclick="qwerty(this.value)" /> <input type="button" value="2" onclick="qwerty(this.value)" /> <input type="button" value="3" onclick="qwerty(this.value)" /> </body> </html>
<html> <head> <script type="text/javascript"> var i = 0; var lastHash = null; function addHistoryStep () { i++; document.getElementById ('test').innerHTML = i; window.location.hash = i; lastHash = window.location.hash; return false; } function setHashObserver () { window.setInterval ("observeHash()", 1); } function observeHash () { if (window.location.hash != lastHash) { var hash = window.location.hash; i = hash.replace ('#', ''); document.getElementById ('test').innerHTML = i; lastHash = window.location.hash; } } </script> </head> <body onload="setHashObserver()"> </body> </html>