在VS中用C#实现
    一个计算乘法。用户只需要在前两个文本框中输入值,然后用鼠标单击第三个文本框,
即可显示结果。

解决方案 »

  1.   

    textBox1.Text = (Convert.ToDouble(textBox1.Text) * Convert.ToDouble(textBox2.Text)).ToString();
      

  2.   

    <html>
    <head>
    <script>
    function showvalue()
    {
    var a=document.getElementById("t1").value;
    var b=document.getElementById("t2").value;
    document.getElementById("t3").value=a*b;
    }
    </script>
    </head>
    <body>
    <input type="text" id="t1" />
    <input type="text" id="t2" />
    <input type="text" id="t3" onfocus="showvalue()" />
    </body>
    </html>