Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h1>Hello</h1>
- <button id="reload">Reload</button>
- <script>
- (function(){
- var reloadButton = document.getElementById('reload');
- if (reloadButton){
- reloadButton.innerHTML += ' ' + Math.random();
- reloadButton.onclick = function(){
- alert('start reload!');
- document.location.reload();
- };
- } else {
- alert('nada');
- }
- })();
- </script>
Add Comment
Please, Sign In to add comment