document.styleSheets[i].rules[j].xxxxx能获取样式或者试试xxx.runtimeStyle.width = (xxx.currentStyle.width).substring....

解决方案 »

  1.   

    晕,你给的是<b>的宽啊!
      

  2.   


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    <style>
    dl {
      margin:0; 
      padding:0 0 15px 0; 
      width:401px; 
      height:auto; 
      background:#fff url(../images/bar.gif) bottom left no-repeat;
      }dt {
      text-align:center; 
      font-size:12px; 
      border-bottom:3px solid #fff;
      }dd {
      margin:0; 
      display:block; 
      width:400px; 
      height:2em; 
      background:#0a0; 
      border-bottom:1px solid #fff;
      font-size:12px; 
      }dd b {
      float:right;
      display:block; 
      margin-left:auto; 
      background:#cec; 
      height:2em; 
      line-height:2em; 
      text-align:right;
      font-size:12px; 
      } dd.p670 b {width:33%;}
    </style>
    <script>
    function add(){
    var Swidth=document.styleSheets[0].rules[4].style.width;
    newSwidth=parseInt(Swidth.substring(0,Swidth.length-1))+5
    document.styleSheets[0].rules[4].style.width=newSwidth+"%"
    }
    </script>
    </head><body>
    <dl>
    <dd class="p670" id="a1" style="margin:0px;"><b>IE.6 = 67% </b></dd>
    </dl>
    <button width="50" onclick="add()">ADD</button>
    </body>
    </html>
    测试吧