Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script type='text/javascript'>
- window.onload = function() {
- document.getElementById('prime_button').onclick = function() {
- var prime = 'primes/' + document.getElementById('prime_in').value + '/'
- location.href = prime
- }
- document.getElementById('gcd_button').onclick = function() {
- var lo = document.getElementById('gcd_in1').value
- var hi = document.getElementById('gcd_in2').value
- var href = 'gcd/' + lo + '/' + hi + '/'
- location.href = href
- }
- }
- </script>
- </head>
- <body>
- <div>
- <input type='text' id='prime_in' placeholder='high' />
- <input type='button' id='prime_button' value='primes' />
- </div>
- <div>
- <input type='text' id = 'gcd_in1' placeholder='lo' />
- <input type='text' id = 'gcd_in2' placeholder='hi' />
- <input type='button' id = 'gcd_button' value='gcds' />
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement