<!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">

       //效果:.简单的加法计算.
        //加载事件
        window.onload = function () {
            //给Button1注册单击事件
            document.getElementById('Button1').onclick = function () {

                var number1 = document.getElementById('txtNumber1').value;
                var number2 = document.getElementById('txtNumber2').value;
                document.getElementById('txtResult').value = parseInt(number1) + parseInt(number2);
            };

        };
    </script>
</head>
<body>
    <input type="text" name="name" value=" " />
</body>
</html>

相关文章:

  • 2022-12-23
  • 2021-11-27
  • 2021-10-26
  • 2022-12-23
  • 2021-12-02
  • 2021-12-02
  • 2021-12-14
猜你喜欢
  • 2021-12-02
  • 2021-04-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
相关资源
相似解决方案