document.GetElementById('btnBeginMark').value = '结束标记';
这样不行吗,为什么报错。对象不支持此属性或方法

解决方案 »

  1.   

    GetElementById要小写一个字母getElementById
    <button id="btn">提交</button>
    document.getElementById('btn').innerHTML="结束标记";
      

  2.   

    可以的,不是不支持此属性或方法,而是拼写错误,楼主在写js代码的时候要特别注意大小写格式。
    document.GetElementById('btnBeginMark').value = '结束标记';
    g小写就行
      

  3.   

    看看这个就行
    <html>
    <head>
    <title>java</title>
    </head>
    <body>
    <input id="bu" type="button" value="按钮" onclick="d()"/>
    <script>
    function d()
    {
     document.getElementById("bu").value="文本已改变";
    }
    </script>
    </body>
    </html>