document.getElementById("txtmoney").value="+money+";这个语法不对吧
document.getElementById("txtmoney").value= money;

解决方案 »

  1.   

    不好意思,
    我的是个表格
    pro_id pro_price pro_amount
        1      5.55     3
        2      5.00     6
        ..     ....     ...
    要计算合计.
      

  2.   

    function Sum(obj1,obj2,obj3)
    {
    var price=obj1.value;
    var amount=obj2.value;
    var total=parseFloat(price)*parseFloat(amount); //如果不能确保值为整数是,不要使用parseInt()obj3.innerText=total;
    var money= total; //SUM不能用
    document.getElementById("txtmoney").value=money;
      

  3.   

    改为这个试试
    document.all("txtmoney").setAttribute(value, money);
      

  4.   

    忘了加个双引号
    document.all("txtmoney").setAttribute("value", money);
      

  5.   

    document.getElementById("txtmoney").value=money;