久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      jquery怎么改變td的width

      方法:1、利用“$("td元素")”獲取td元素對象;2、利用css方法修改元素的width,語法為“td元素對象.css("width","改變后的寬度");”。css()方法用于設(shè)置或返回被選元素的一個或多個樣式屬性。

      jquery怎么改變td的width

      本教程操作環(huán)境:windows10系統(tǒng)、jquery3.2.1版本、Dell G3電腦。

      jquery怎么改變td的width

      1、獲取td元素對象

      語法如下:

      $("td元素")

      2、css()方法修改width

      css() 方法設(shè)置或返回被選元素的一個或多個樣式屬性。

      如需返回指定的 CSS 屬性的值,請使用如下語法:

      css("propertyname");

      如需設(shè)置指定的 CSS 屬性,請使用如下語法:

      css("propertyname","value");

      示例如下:

      <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="js/jquery.min.js"> </script> <script> $(document).ready(function(){   $("button").click(function(){     $("td").css("width","200px");   }); }); </script> </head> <body> <table border="1">   <tr>     <th>Month</th>     <th>Savings</th>   </tr>   <tr>     <td>January</td>     <td>$100</td>   </tr> </table> <button>設(shè)置 </button> </body> </html>

      輸出結(jié)果:

      jquery怎么改變td的width

      視頻教程推薦:jQuery視頻教程

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號