Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form>
- <input type="number" id="num1">
- <input type="number" id="num2">
- <input type="button" value="oi" onclick="calpp()">
- </form>
- <script>
- var x = parseInt(document.getElementById('num1').value, 10);
- var y = parseInt(document.getElementById('num2').value, 10);
- function calpp(){
- alert(x+y);
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement