<input type=text  name=num1 onkeydown='count()'>
<input type=text name=num2 onkeydown='count()'>
<input type=text name=num3>
<script>
function count(){
try{
  num3.value=parseInt(parseInt(num1.value)*parseInt(num2.value));
}
catch(3)
{
num3.value=0;
}}
</script>

解决方案 »

  1.   

    num1<input id="t1" type=text>
    num2<input id=t2 type=text>
    <input type=button onclick="displayv.innerText = (t1.value * t2.value)">
    <div id='displayv"></div>
      

  2.   

    <html><head>
    <title>New Page 1</title>
    </head><body><form method="POST" action="--WEBBOT-SELF--">  <p><input type="text" name="t1" size="20" onkeyup="t2.value=this.value*this.value"></p>
      <p><input type="text" name="t2" size="20"></p>
    </form></body></html>
      

  3.   

    to  xiaoshi(java入门中....)(半知不解):你的我觉得应该改称这个
    <html><head><script>
    function count(){ f1.num3.value=parseInt(parseInt(f1.num1.value)*parseInt(f1.num2.value));}
    </script></head><body>
    <form name="f1">
    <input type=text  name=num1 onkeyup='count()'><input type=text name=num2 onkeyup='count()'>
    <input type=text name=num3>
    </form>
    </body></html>
      

  4.   

    还是 zhaoweiwei(轩辕大侠) 回答严谨