Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body>
- <h2>Suora linkki sivulle</h2>
- <form>
- Syötä nimi:<br>
- <input type="text" id="numerot">
- <br />
- <input type="button" onClick="hae()" value="Hae"/>
- <br />
- <input type="button" onClick="haeIkkuna()" value="Hae uudella ikkunalla"/>
- <br>
- </form>
- <script>
- function hae() {
- document.location.href = 'http://www.paska.com/' + document.getElementById("numerot").value
- }
- function haeIkkuna() {
- window.open('https://www.paska.com/' + document.getElementById("numerot").value, '_blank');
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement