Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script language = "javascript">
- function changeText(id){
- id.innerHTML = "New Heading!";
- }
- function showDate(id){
- id.innerHTML = Date();
- }
- function changeImage1(id){
- id.src = "a.jpg";
- }
- function changeImage2(id){
- id.src = "b.jpg";
- }
- </script>
- </head>
- <body>
- <h1 onmouseover = "changeText(this)"> Hover! </h1>
- <p> <button onclick = "showDate(this)"> Click for latest time! </button> </p>
- <img src = "b.jpg" onmousedown = "changeImage1(this)" onmouseup = "changeImage2(this)" />
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement