标签:
1,获取所些文本框的值
1 <script> 2 function show() { 3 var a1 = document.getElementById("a1"); 4 var a2 = document.getElementById("a2"); 5 var show = document.getElementById("show"); 6 show.innerHTML = "a1的值是:" + a1.value + "; a2的值是: " + a2.value; 7 } 8 </script> 9 <input name="a1" type="text" id="a1" onchange="show()" /> 10 <input name="a2" type="text" id="a2" /> 11 <input type="button" name="Submit" value="按钮" onclick="show();" /> 12 <div id="show"></div>
2,若是求两数之集的话
效果图
标签:
原文地址:http://www.cnblogs.com/lyq666666/p/5766219.html