Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Untitled Document</title>
- <script type="text/javascript">
- function init() {
- var snabel = document.getElementById("snabel");
- if (snabel !=null) {
- var html = "";
- for (i=1; i<=12; i++) {
- html += '<input type="button" value="-5" onclick="var o=document.getElementById(\'snabel'+i+'\'); o.value = parseInt(o.value) + parseInt(this.value);">';
- html += '<input type="button" value="-3" onclick="var o=document.getElementById(\'snabel'+i+'\'); o.value = parseInt(o.value) + parseInt(this.value);">';
- html += '<input type="button" value="-1" onclick="var o=document.getElementById(\'snabel'+i+'\'); o.value = parseInt(o.value) + parseInt(this.value);">';
- html += '<input name="" type="text" value="0" size="5" id="snabel'+i+'" readonly="true">';
- html += '<input type="button" value="+1" onclick="var o=document.getElementById(\'snabel'+i+'\'); o.value = parseInt(o.value) + parseInt(this.value);">';
- html += '<input type="button" value="+3" onclick="var o=document.getElementById(\'snabel'+i+'\'); o.value = parseInt(o.value) + parseInt(this.value);">';
- html += '<input type="button" value="+5" onclick="var o=document.getElementById(\'snabel'+i+'\'); o.value = parseInt(o.value) + parseInt(this.value);">';
- html += '<br />';
- }
- snabel.innerHTML = html;
- }
- }
- </script>
- </head>
- <body onload="init();">
- <center id="snabel">
- </center>
- </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement