1. <tt id="5hhch"><source id="5hhch"></source></tt>
    1. <xmp id="5hhch"></xmp>

  2. <xmp id="5hhch"><rt id="5hhch"></rt></xmp>

    <rp id="5hhch"></rp>
        <dfn id="5hhch"></dfn>

      1. 詳細(xì)講解jQuery中height()方法用法

        時(shí)間:2020-11-11 13:30:54 jQuery Mobile 我要投稿

        詳細(xì)講解jQuery中height()方法用法

          本文實(shí)例講述了jQuery中height()方法用法。分享給大家供大家參考。具體分析如下:

          此方法可以獲取或者設(shè)置匹配元素的.高度值,默認(rèn)單位是px。

          語法結(jié)構(gòu)一:

          復(fù)制代碼 代碼如下:$(selector).height()

          不帶參數(shù)的時(shí)候是返回第一個(gè)匹配元素的當(dāng)前高度。

          實(shí)例代碼:

          復(fù)制代碼 代碼如下:

          div{

          height:150px;

          width:150px;

          background-color:green;

          margin-top:10px;

          }

          $(document).ready(function(){

          alert($("div").height());

          })

          語法結(jié)構(gòu)二:

          復(fù)制代碼 代碼如下:$(selector).height(val)

          帶參數(shù)的時(shí)候是設(shè)置所有匹配元素的高度,默認(rèn)單位是px,當(dāng)然也可以使用其他的單位如em或者百分比等等。

          實(shí)例代碼:

          復(fù)制代碼 代碼如下:

          div{

          height:150px;

          width:150px;

          background-color:green;

          margin-top:10px;

          }

          $(document).ready(function(){

          $("button").click(function(){

          $("div").height("200px")

          })

          })

          希望本文所述對(duì)大家的jQuery程序設(shè)計(jì)有所幫助。

        【詳細(xì)講解jQuery中height()方法用法】相關(guān)文章:

        1.jQuery中replaceAll()方法用法

        2.jQuery中trigger方法用法

        3.jQuery中prev()方法用法

        4.jQuery中nextAll()方法用法欣賞

        5.JQuery中Text方法用法實(shí)例分析

        6.jquery獲取css中的選擇器用法實(shí)例講解

        7.jQuery中delegate()實(shí)例用法

        8.關(guān)于jQuery trigger()方法用法介紹

        国产高潮无套免费视频_久久九九兔免费精品6_99精品热6080YY久久_国产91久久久久久无码

        1. <tt id="5hhch"><source id="5hhch"></source></tt>
          1. <xmp id="5hhch"></xmp>

        2. <xmp id="5hhch"><rt id="5hhch"></rt></xmp>

          <rp id="5hhch"></rp>
              <dfn id="5hhch"></dfn>