<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>無標題文檔</title><script type="text/javascript">function count(){var d1=document.getElementById("id1").value;var d2=document.getElementById("id2").value;var d3=document.getElementById("id3").value;var d="";switch(d3){ case "+":d = parseFloat(d1) + parseFloat(d2);break; case "-":d = parseFloat(d1) - parseFloat(d2);break; case "*":d = parseFloat(d1) * parseFloat(d2);break;default:d = parseFloat(d1) / parseFloat(d2);}document.getElementById("id4").value=d;} </script></head><body><input type="text" id="id1" ?/><select id="id2"><option value="+">+</option><option value="-">-</option><option value="*">*</option><option value="/">/</option></select><input type="text" id="id3" ?/><input type="button" id="id3" value="=" onclick="count()"/><input type="text" id="id4" ?/></body></html>跑起來點擊等于的時候顯示那N
求助,這個簡易計算器用不了
我們
2015-10-19 22:03:42