怎么样把javascript计算的结果属给一个label控件的text属性!

解决方案 »

  1.   

    Response.write("<script>document.all.label的id.value="+你的结果+</script>");
      

  2.   

    akinggmx(为了生活而编程) 正确
      

  3.   

    Response.write("<script>document.all.label的id.value="+你的结果+</script>");差不多了
      

  4.   

    akinggmx(为了生活而编程) 正确
      

  5.   

    Response.write("<script>document.all.label的id.value="+你的结果+</script>");正解
      

  6.   

    document.getElementByID("控件名").value=“”;
    这段是客户端代码
      

  7.   

    还是这样的,我的意思是:在javascript中怎么样把javascript计算的结果属给label,不要在后台的C#中写!
    <script language="javascript">
    <!--
    .....
    var label=null;
    label=table.rows[rIndex+1].cells[cIndex].childNodes[0];//找到label控件
    label.value = sum;//计算的结果值
    .....
    -->
    </script>
      

  8.   

    上面写的是对的啊,在htm中服务器控件也是有id的啊,只要你提供的id是正确的,就可以上id传值
      

  9.   

    eval(document.getElementById("rowTotal")).innerText=rowobj;
    其中rowTotal为lable的id,rowobj是你要赋的值