<body>
     <form>
<table>
          <tr>
<td><input type="text" name="text1"/></td>
<td><input type="text" name="text1"/></td>
<td><input type="text" name="text1"/></td>
<td><input type="text" name="text1"/></td>
<td><input type="button" id="button1" onclick="openVvv()" value="提交"/></td>
<td><input type="button" id="button1" onclick="openCcc()" value="关闭"/></td>
          </tr>
  <tr>
<td><input type="text" name="text1"/></td>
<td><input type="text" name="text1"/></td>
<td><input type="text" name="text1"/></td>
<td><input type="text" name="text1"/></td>
<td><input type="button" id="button1" onclick="openVvv()" value="提交"/></td>
<td><input type="button" id="button1" onclick="openCcc()" value="关闭"/></td>
          </tr>
 </table>
     </form>
  </body>
我想把第一行中的两个按钮屏蔽   用dom怎么做啊   

解决方案 »

  1.   

    <td><input type="button" id="button1" onclick="openVvv()" value="提交"/></td> 
    <td><input type="button" id="button1" onclick="openCcc()" value="关闭"/></td> 首先两个按钮的id怎么能一样呢?接着:
    //不显示
    document.getElementById("button1").style.display = "none";
    document.getElementById("button2").style.display = "none";
      

  2.   

    agree<td><input type="button" id="button1" onclick="openVvv()" value="提交"/></td> 
    <td><input type="button" id="button1" onclick="openCcc()" value="关闭"/></td> 1:把两个ID区分一下2: document.getElementById(id).style.display="none";
      

  3.   

    //不能点击document.getElementById("button1").disabled = true;
    document.getElementById("button2").disabled = true;
      

  4.   

    感谢大家  自己搞定了  跟你们分享下 
    var entbut=event.srcElement;//获取该节点
    var fjd=entbut.parentNode;//获取父节点
    var zjd=fjd.childNodes;//获取父节点下面所以子节点
    for(var i=0;i<zjd.length;i++){
    if(zjd[i].type=="button" && zjd[i].nodeName=="INPUT");//判断该子节点的类型 和属性 
    {
    zjd[i].disabled=true;//把button的状态屏蔽
    }
    }
    公司的一个牛人交的