Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <script type="text/javascript">
- function fotka()
- {
- var hehe=document.getElementById("selekt").value;
- hehe=parseInt(hehe);
- switch(hehe)
- {
- case 1:
- document.getElementById("photo").src="1.png";
- break;
- case 2:
- document.getElementById("photo").src="2.png";
- break;
- case 3:
- document.getElementById("photo").src="3.jpg";
- break;
- }
- }
- </script>
- </head>
- <body>
- <center>
- <select id="selekt">
- <option value="1">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- </select>
- <input type="submit" value="Wybierz" onclick="fotka()">
- <br />
- <img id="photo">
- <center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement