Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>DOM-scripting</title>
- <meta charset="utf-8"/>
- <style type="text/css">
- <!--
- body { background-color: #B478ED;
- }
- -->
- </style>
- <script type="text/javascript">
- function imageBig(x) {
- document.getElementById(x).heigth="300";
- document.getElementById(x).width="300";
- }
- function imageSmall(x) {
- document.getElementById(x).heigth="256";
- document.getElementById(x).widht="256";
- }
- </script>
- </head>
- <body>
- <table>
- <tr>
- <td>
- <img src="img/elephant.png" id="elephant" alt="Olifant" ondblclick="imageBig(this.id)" onclick="imageSmall(this.id)"/>
- </td>
- <td>
- <img src="img/rhino.png" id="rhino" alt="Neushoorn" ondblclick="imageBig(this.id)" onclick="imageSmall(this.id)"/>
- </td>
- <td>
- <img src="img/mouse.png" id="mouse" alt="Muis" ondblclick="imageBig(this.id)" onclick="imageSmall(this.id)"/>
- </td>
- <td>
- <img src="img/rabbit.png" id="rabbit" alt="Konijn" ondblclick="imageBig(this.id)" onclick="imageSmall(this.id)"/>
- </td>
- </tr>
- </table>
- </body>
- </html>
Add Comment
Please, Sign In to add comment