Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>jQ</title>
- <script src="jquery.js"></script>
- </head>
- <body>
- <script>
- function galery() {
- var img = document.getElementById("myImage");
- if ( img.getAttribute('src') == "./1.jpeg") {
- img.setAttribute('src', './big.jpg');
- } else {
- img.setAttribute('src', './1.jpeg');
- }
- }
- </script>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Color</title>
- </head>
- <body>
- <img src="./1.jpeg" id = "myImage" onclick="galery()">
- </body>
- </html>
Add Comment
Please, Sign In to add comment