注意不是<asp:label runat="server" />
而是<label id="xx">asdasdf</label>用value不行,text?好像没这个属性

解决方案 »

  1.   

    要在服务器脚本中读出使用:this.xx.value;(当然前提是你的label有一个增加属性 runat=server)
    在客户端读就简单了:this.document.Form1.xx.value;
      

  2.   

    test.html:<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    <script language="JavaScript">
    function getlabelInnerText()
    {
    alert(document.all.aa.innerText);
    }
    </script>
    </head><body>
    <label id="aa">文本</label>
    <input type="button" name="test" value="test" onClick="getlabelInnerText()">
    </body>
    </html>
      

  3.   

    document.all.xx.innerText    or document.all.xx.innerHTML注意大小写
      

  4.   

    哈,谢谢各位,用innerHTML搞定,innerText会把html代码除掉,只剩下文本。