<body>
    <form id="form1" runat="server">
   <table><tr><td width="200px;" style="background-color:Blue ;">
       <input id="Button1" type="button" value="button"  onclick="AddWidth()"/></td></tr></table>
</form> 
</body>
<script type="text/javascript">
      var td=document.getElementsByTagName("td");
      
      function AddWidth()
      {
        for(var i=0;i<td.length;i++)
        {
            td[i].width=parseInt(td[i].width)+1;
         }
      }
</script>

解决方案 »

  1.   


     <form id="form1" runat="server">
       <table><tr><td  style="background-color:Blue ;width:200px;">
           <input id="Button1" type="button" value="button"  onclick="AddWidth()"/></td></tr></table>
    </form> 
    </body>
    <script type="text/javascript">
          var td=document.getElementsByTagName("td");
          
          function AddWidth()
          {
            for(var i=0;i<td.length;i++)
            {
                td[i].style.width=parseInt(td[i].style.width)-1;
             }
          }
    </script>再给你个减的,样式写CSS里的
      

  2.   

     <table><tr><td style="background-color:Blue ;width:200px;">
           <input type="button" value="加"  onclick="op(this,1)"/>
           <input type="button" value="减"  onclick="op(this,2)"/></td></tr></table><script type="text/javascript">
          function op(o,type){
            var td=o.parentNode,step=type==1?1:-1;
            td.style.width=parseInt(td.style.width)+step+"px";
          }
    </script>