<script> function demo(obj,tip){ if(tip==1){ var con=document.getElementById('content').value; document.getElementById('content').value=con+obj.innerHTML; }else if(tip==2){ document.getElementById('content').value=""; }else if(tip==3){ var con=document.getElementById('content').value; document.getElementById('content').value=con.slice(0,-1); } } </script> <button οnclick="demo(this,1)">7</button> <button οnclick="demo(this,1)">8</button> <button οnclick="demo(this,1)">9</button> <br> <button οnclick="demo(this,1)">4</button> <button οnclick="demo(this,1)">5</button> <button οnclick="demo(this,1)">6</button> <br> <button οnclick="demo(this,1)">1</button> <button οnclick="demo(this,1)">2</button> <button οnclick="demo(this,1)">3</button> <br> <button οnclick="demo(this,2)">C</button> <button οnclick="demo(this,1)">0</button> <button οnclick="demo(this,3)">X</button> <br> <input type="text" id="content" />
自制数字软盘
最新推荐文章于 2024-08-27 12:52:19 发布