欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jQuery選擇器全集詳解

 更新時(shí)間:2014年11月24日 10:25:51   投稿:hebedich  
本文結(jié)合圖文代碼,基本上將所有的jQuery選擇器都講解了一遍,非常的詳盡,希望對(duì)大家能有所幫助。

選擇器是jQuery最基礎(chǔ)的東西,本文中列舉的選擇器基本上囊括了所有的jQuery選擇器,也許各位通過(guò)這篇文章能夠加深對(duì)jQuery選擇器 的理解,它們本身用法就非常簡(jiǎn)單,我更希望的是它能夠提升個(gè)人編寫(xiě)jQuery代碼的效率。本文配合截圖、代碼和簡(jiǎn)單的概括對(duì)所有jQuery選擇器進(jìn)行 了介紹,也列舉出了一些需要注意和區(qū)分的地方。

一、基本選擇器

1. id選擇器(指定id元素)

將id="one"的元素背景色設(shè)置為黑色。(id選擇器返單個(gè)元素)

$(document).ready(function () {
        $('#one').css('background', '#000');
    });

2. class選擇器(遍歷css類(lèi)元素)

將class="cube"的元素背景色設(shè)為黑色

$(document).ready(function () {
        $('.cube').css('background', '#000');
    });

3. element選擇器(遍歷html元素)

將p元素的文字大小設(shè)置為12px

$(document).ready(function () {
        $('p').css('font-size', '12px');
    });

4. * 選擇器(遍歷所有元素)

$(document).ready(function () {
        // 遍歷form下的所有元素,將字體顏色設(shè)置為紅色
        $('form *').css('color', '#FF0000');
    });

5. 并列選擇器

$(document).ready(function () {
    // 將p元素和div元素的margin設(shè)為0
    $('p, div').css('margin', '0');
  });


二、 層次選擇器

1. parent > child(直系子元素)

$(document).ready(function () {
    // 選取div下的第一代span元素,將字體顏色設(shè)為紅色
    $('div > span').css('color', '#FF0000');
  });

下面的代碼,只有第一個(gè)span會(huì)變色,第二個(gè)span不屬于div的一代子元素,顏色保持不變。

<div>
    <span>123</span>
    <p>
      <span>456</span>
    </p>
</div>

2. prev + next(下一個(gè)兄弟元素,等同于next()方法)

$(document).ready(function () {
  // 選取class為item的下一個(gè)div兄弟元素
  $('.item + div').css('color', '#FF0000');
  // 等價(jià)代碼  
//$('.item').next('div').css('color', '#FF0000');});

下面的代碼,只有123和789會(huì)變色

<p class="item"></p>
<div>123</div>
<div>456</div>
<span class="item"></span>
<div>789</div>

3. prev ~ siblings(prev元素的所有兄弟元素,等同于nextAll()方法)

$(document).ready(function () {
    // 選取class為inside之后的所有div兄弟元素
    $('.inside ~ div').css('color', '#FF0000');
    // 等價(jià)代碼
    //$('.inside').nextAll('div').css('color', '#FF0000');});

下面的代碼,G2和G4會(huì)變色

<div class="inside">G1</div>
<div>G2</div>
<span>G3</span>
<div>G4</div>

三、 過(guò)濾選擇器

1. 基本過(guò)濾選擇器

——1.1 :first和:last(取第一個(gè)元素或最后一個(gè)元素)

$(document).ready(function () {
            $('span:first').css('color', '#FF0000');
            $('span:last').css('color', '#FF0000');
        });

下面的代碼,G1(first元素)和G3(last元素)會(huì)變色

<span>G1</span>
<span>G2</span>
<span>G3</span>

——1.2 :not(取非元素)

$(document).ready(function () {
            $('div:not(.wrap)').css('color', '#FF0000');
        });

下面的代碼,G1會(huì)變色

<div>G1</div>
<div class="wrap">G2</div>

但是,請(qǐng)注意下面的代碼:

<div>
    G1    <div class="wrap">G2</div>
</div>

當(dāng)G1所在div和G2所在div是父子關(guān)系時(shí),G1和G2都會(huì)變色。

——1.3 :even和:odd(取偶數(shù)索引或奇數(shù)索引元素,索引從0開(kāi)始,even表示偶數(shù),odd表示奇數(shù))

$(document).ready(function () {
            $('tr:even').css('background', '#EEE'); // 偶數(shù)行顏色
            $('tr:odd').css('background', '#DADADA'); // 奇數(shù)行顏色
        });

A、C行顏色#EEE(第一行的索引為0),B、D行顏色#DADADA

image

<table width="200" cellpadding="0" cellspacing="0">
    <tbody>
        <tr><td>A</td></tr>
        <tr><td>B</td></tr>
        <tr><td>C</td></tr>
        <tr><td>D</td></tr>
    </tbody>
</table>

——1.4 :eq(x) (取指定索引的元素)

image

$(document).ready(function () {
            $('tr:eq(2)').css('background', '#FF0000');
        });

更改第三行的背景色,在上面的代碼中C的背景會(huì)變色。

——1.5 :gt(x)和:lt(x)(取大于x索引或小于x索引的元素)

$(document).ready(function () {
            $('ul li:gt(2)').css('color', '#FF0000');
            $('ul li:lt(2)').css('color', '#0000FF');
        });

L4和L5會(huì)是紅色,L1和L2會(huì)是藍(lán)色,L3是默認(rèn)顏色

image

<ul>
    <li>L1</li>
    <li>L2</li>
    <li>L3</li>
    <li>L4</li>
    <li>L5</li>
</ul>

——1.6 :header(取H1~H6標(biāo)題元素)

$(document).ready(function () {
            $(':header').css('background', '#EFEFEF');
        });

下面的代碼,H1~H6的背景色都會(huì)變

image

<h1>H1</h1>
<h2>H2</h2>
<h3>H3</h3>
<h4>H4</h4>
<h5>H5</h5>
<h6>H6</h6>

2. 內(nèi)容過(guò)濾選擇器

——2.1 :contains(text)(取包含text文本的元素)

$(document).ready(function () {
      // dd元素中包含"jQuery"文本的會(huì)變色
      $('dd:contains("jQuery")').css('color', '#FF0000');
    });

下面的代碼,第一個(gè)dd會(huì)變色

image

<dl>
    <dt>技術(shù)</dt>
    <dd>jQuery, .NET, CLR</dd>
    <dt>SEO</dt>
    <dd>關(guān)鍵字排名</dd>
    <dt>其他</dt>
    <dd></dd>
</dl>

——2.2 :empty(取不包含子元素或文本為空的元素)

$(document).ready(function () {
            $('dd:empty').html('沒(méi)有內(nèi)容');
});

image

上面第三個(gè)dd會(huì)顯示"沒(méi)有內(nèi)容"文本

——2.3 :has(selector)(取選擇器匹配的元素)

$(document).ready(function () {
            // 為包含span元素的div添加邊框
            $('div:has(span)').css('border', '1px solid #000');
        });

即使span不是div的直系子元素,也會(huì)生效

image

<div>
    <h2>
        A        <span>B</span>
    </h2>
</div>

——2.4 :parent(取包含子元素或文本的元素)

$(document).ready(function () {
            $('ol li:parent').css('border', '1px solid #000');
        });

下面的代碼,A和D所在的li會(huì)有邊框

image

<ol>
    <li></li>
    <li>A</li>
    <li></li>
    <li>D</li>
</ol>

3. 可見(jiàn)性過(guò)濾選擇器

——3.1 :hidden(取不可見(jiàn)的元素)

jQuery至1.3.2之后的:hidden選擇器僅匹配display:none或<input type="hidden" />的元素,而不匹配visibility: hidden或opacity:0的元素。這也意味著hidden只匹配那些“隱藏的”并且不占空間的元素,像visibility:hidden或 opactity:0的元素占據(jù)了空間,會(huì)被排除在外。

參照:http://www.jquerysdk.com/api/hidden-selector

下面的代碼,先彈出"hello"對(duì)話框,然后hid-1會(huì)顯示,hid-2仍然是不可見(jiàn)的。

image

<html xmlns="<head runat="server">
    <title></title>
    <style type="text/css">
        div
        {
            margin: 10px;
            width: 200px;
            height: 40px;
            border: 1px solid #FF0000;
            display:block;
        }
        .hid-1
        {
            display: none;
        }
        .hid-2
        {
            visibility: hidden;
        }
    </style>
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $('div:hidden').show(500);
            alert($('input:hidden').val());
        });
    </script>
</head>
<body>
    <div class="hid-1">display: none</div>
    <div class="hid-2">visibility: hidden</div>
    <input type="hidden" value="hello"/>
</body>
</html>

——3.2 :visible(取可見(jiàn)的元素)

下面的代碼,最后一個(gè)div會(huì)有背景色

image

<script type="text/javascript">
    $(document).ready(function() {        $('div:visible').css('background', '#EEADBB');    });</script>
<div class="hid-1">display: none</div>
<div class="hid-2">visibility: hidden</div>
<input type="hidden" value="hello"/>
<div>
    jQuery選擇器大全</div>

4. 屬性過(guò)濾選擇器

——4.1 [attribute](取擁有attribute屬性的元素)

下面的代碼,最后一個(gè)a標(biāo)簽沒(méi)有title屬性,所以它仍然會(huì)帶下劃線

image

<script type="text/javascript">
        $(document).ready(function() {            $('a[title]').css('text-decoration', 'none');       });    </script>      
    <ul>
        <li><a href="#" title="DOM對(duì)象和jQuery對(duì)象" class="item">DOM對(duì)象和jQuery對(duì)象</a></li>
        <li><a href="#" title="jQuery選擇器大全" class="item-selected">jQuery選擇器大全</a></li>
        <li><a href="#" title="jQuery事件大全" class="item">jQuery事件大全</a></li>
        <li><a href="#" title="基于jQuery的插件開(kāi)發(fā)" class="item">基于jQuery的插件開(kāi)發(fā)</a></li>
        <li><a href="#" title="Wordpress & jQuery" class="item">Wordpress & jQuery</a></li>
        <li><a href="#" class="item">其他</a></li>
    </ul>

——4.2 [attribute = value]和[attribute != value](取attribute屬性值等于value或不等于value的元素)

分別為class="item"和class!=item的a標(biāo)簽指定文字顏色

image

<script type="text/javascript">
       $(document).ready(function() {
           $('a[class=item]').css('color', '#FF99CC');
           $('a[class!=item]').css('color', '#FF6600');
       });</script>

——4.3 [attribute ^= value], [attribute $= value]和[attribute *= value](attribute屬性值以value開(kāi)始,以value結(jié)束,或包含value值)

在屬性選擇器中,^$符號(hào)和正則表達(dá)式的開(kāi)始結(jié)束符號(hào)表示的含義是一致的,*模糊匹配,類(lèi)似于sql中的like '%str%'。

image

<script type="text/javascript">
    // 識(shí)別大小寫(xiě),輸入字符串時(shí)可以輸入引號(hào),[title^=jQuery]和[title^="jQuery"]是一樣的
    $('a[title^=jQuery]').css('font-weight', 'bold');
    $('a[title$=jQuery]').css('font-size', '24px');
    $('a[title*=jQuery]').css('text-decoration', 'line-through');</script>

——4.4 [selector1][selector2](復(fù)合型屬性過(guò)濾器,同時(shí)滿(mǎn)足多個(gè)條件)

將title以"jQuery"開(kāi)始,并且class="item"的a標(biāo)簽隱藏,那么<a href="#" title="jQuery事件大全" class="item">jQuery事件大全</a>會(huì)被隱藏

<script type="text/javascript">
        $(document).ready(function() {
            $('a[title^=jQuery][class=item]').hide();
        });
    </script>

5. 子元素過(guò)濾選擇器

——5.1 :first-child和:last-child

:first-child表示第一個(gè)子元素,:last-child表示最后一個(gè)子元素。

需要大家注意的是,:fisrst和:last返回的都是單個(gè)元素,而:first-child和:last-child返回的都是集合元素。舉個(gè) 例子:div:first返回的是整個(gè)DOM文檔中第一個(gè)div元素,而div:first-child是返回所有div元素下的第一個(gè)元素合并后的集 合。

這里有個(gè)問(wèn)題:如果一個(gè)元素沒(méi)有子元素,:first-child和:last-child會(huì)返回null嗎?請(qǐng)看下面的代碼:

<html xmlns="<head runat="server">
    <title></title>
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
        var len1 = $('div:first-child').length;
        var len2 = $('div:last-child').length;
     });
    </script>
</head>
<body>
<div>
    <div>
        <div></div>
    </div>
</div>
</body>
</html>

也許你覺(jué)得這個(gè)答案,是不是太簡(jiǎn)單了?len1 = 2, len2 = 2。但實(shí)際確并不是,它們倆都等于3。
把上面的代碼稍微修改一下:

<html xmlns="<head runat="server">
    <title></title>
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
        var len1 = $('div:first-child').length;
        var len2 = $('div:last-child').length;
        $('div:first-child').each(function() {
            alert($(this).html());
        });
     });
    </script>
</head>
<body>
<div>123
    <div>456
        <div></div>
    </div>
</div>
</body>
</html>

結(jié)果卻是彈出三個(gè)alert,只不過(guò)最后一個(gè)alert里面是空白的。

image

——5.2 :only-child

當(dāng)某個(gè)元素有且僅有一個(gè)子元素時(shí),:only-child才會(huì)生效。

<html xmlns="<head runat="server">
    <title></title>
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $('div:only-child').css('border', '1px solid #FF0000').css('width','200px');
        });
    </script>
</head>
<body>
<div>123
    <div>456
        <div></div>
    </div>
</div>
</body>
</html>

這里:only-child也是三個(gè)元素,從最后一個(gè)很粗的紅色邊框(實(shí)際是兩個(gè)元素的邊框重疊了)也可以看出來(lái)。

image

——5.3 :nth-child

看到這個(gè)就想起英文單詞里的,fourth, fifth, sixth……,nth表示第n個(gè),:nth-child就表示第n個(gè)child元素。要注意的是,這兒的n不像eq(x)、gt(x)或lt(x)是從 0開(kāi)始的,它是從1開(kāi)始的,英文里好像也沒(méi)有zeroth這樣的序號(hào)詞吧。

:nth-child有三種用法:

1) :nth-child(x),獲取第x個(gè)子元素
2) :nth-child(even)和:nth-child(odd),從1開(kāi)始,獲取第偶數(shù)個(gè)元素或第奇數(shù)個(gè)元素
3) :nth-child(xn+y),x>=0,y>=0。例如x = 3, y = 0時(shí)就是3n,表示取第3n個(gè)元素(n>=0)。實(shí)際上x(chóng)n+y是上面兩種的通項(xiàng)式。(當(dāng)x=0,y>=0時(shí),等同于:hth- child(x);當(dāng)x=2,y=0時(shí),等同于nth-child(even);當(dāng)x=2,y=1時(shí),等同于:nth-child(odd))

下面的兩個(gè)例子是針對(duì)2)和3)的,1)的例子我就不列舉了。

例2:

image

<html xmlns="<head runat="server">
    <title></title>
    <style type="text/css">
       
        td {
            width: 200px;
            height: 32px;
            line-height: 32px;
        }
       
    </style>
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            // 偶數(shù)行背景紅色
            $('tr:nth-child(even)').css('background', '#FF0000');
            // 奇數(shù)行背景藍(lán)色
            $('tr:nth-child(odd)').css('background', '#0000FF');
        });
    </script>
</head>
<body>
    <table>
        <tr><td>1. NBA 2012季后賽</td></tr>
        <tr><td>2. NBA 2011季后賽</td></tr>
        <tr><td>3. NBA 2010季后賽</td></tr>
        <tr><td>4. NBA 2009季后賽</td></tr>
        <tr><td>5. NBA 2008季后賽</td></tr>
        <tr><td>6. NBA 2007季后賽</td></tr>
    </table>
</body>
</html>

例3(html代碼和例2是一樣的):

SNAGHTMLd6d414

<script type="text/javascript">
    $(document).ready(function() {
        $('tr:nth-child(3n)').css('background', '#0000FF');
    });</script>

6. 表單對(duì)象屬性過(guò)濾選擇器

——6.1 :enabled和:disabled(取可用或不可用元素)

:enabled和:diabled的匹配范圍包括input, select, textarea。

image

<script type="text/javascript">
        $(document).ready(function() {
            $(':enabled').css('border', '1px solid #FF0000');
            $(':disabled').css('border', '1px solid #0000FF');
        });
    </script>
    <div>
        <input type="text" value="可用的文本框" />
    </div>
    <div>
        <input type="text" disabled="disabled" value="不可用的文本框" />
    </div>
    <div>
        <textarea disabled="disabled">不可用的文本域</textarea>
    </div>
    <div>
        <select disabled="disabled">
            <option>English</option>
            <option>簡(jiǎn)體中文</option>
        </select>
    </div>

——6.2 :checked(取選中的單選框或復(fù)選框元素)

下面的代碼,更改邊框或背景色僅在IE下有效果,chrome和firefox不會(huì)改變,但是alert都會(huì)彈出來(lái)。

image

<script type="text/javascript">
    $(document).ready(function() {
        $(':checked').css('background', '#FF0000').each(function() {
            alert($(this).val());
        });
    });</script>
<div>
    <input type="checkbox" checked="checked" value="must"/>必須勾選</div>
<div>你現(xiàn)在工作的企業(yè)屬于:
    <input type="radio" name="radio" checked="checked" value="外企"/>外企
    <input type="radio" name="radio" value="國(guó)企"/>國(guó)企
    <input type="radio" name="radio" value="民企"/>民企</div>

——6.3 :selected(取下拉列表被選中的元素)

SNAGHTML14414ae

<script type="text/javascript">
    $(document).ready(function() {
        alert($(':selected').val());
    });</script>
<select>
    <option value="外企">外企</option>
    <option value="國(guó)企">國(guó)企</option>
    <option value="私企">私企</option>
</select>

四、表單選擇器

1. :input(取input,textarea,select,button元素)

:input元素這里就不再多說(shuō)了,前面的一些例子中也已經(jīng)囊括了。

2. :text(取單行文本框元素)和:password(取密碼框元素)

這兩個(gè)選擇器分別和屬性選擇器$('input[type=text]')、$('input[type=password]')等同。

image

<script type="text/javascript">
   $(document).ready(function() {
        $(':text').css('border', '1px solid #FF0000');
        $(':password').css('border', '1px solid #0000FF');
        // 等效代碼
        //$('input[type=text]').css('border', '1px solid #FF0000');
        //$('input[type=password]').css('border', '1px solid #0000FF');
   });</script>
<fieldset style="width: 300px;">
    <legend>賬戶(hù)登錄</legend>
     <div>
        <label>用戶(hù)名:</label><input type="text"/>
    </div>
    <div>
        <label>密&nbsp;&nbsp;碼:</label><input type="password"/>
    </div>
</fieldset>

3. :radio(取單選框元素)

:radio選擇器和屬性選擇器$('input[type=radio]')等同

<script type="text/javascript">
    $(document).ready(function() {
        $(':radio').each(function() {
            alert($(this).val());
        });
        // 等效代碼
        /*
        $('input[type=radio]').each(function() {
            alert($(this).val());
        });
        */
    });</script>你現(xiàn)在工作的企業(yè)屬于:
    <input type="radio" name="radio" checked="checked" value="外企"/>外企
    <input type="radio" name="radio" value="國(guó)企"/>國(guó)企
    <input type="radio" name="radio" value="民企"/>民企

4. :checkbox(取復(fù)選框元素)

:checkbox選擇器和屬性選擇器$('input[type=checkbox]')等同

<script type="text/javascript">
    $(document).ready(function() {
        $(':checkbox').each(function() {
            alert($(this).val());
        });
        // 等效代碼
        /*
        $('input[type=checkbox]').each(function() {
            alert($(this).val());
        });
        */
    });</script>
    您的興趣愛(ài)好:
    <input type="checkbox" />游泳
    <input type="checkbox" />看書(shū)
    <input type="checkbox" checked="checked" value="打籃球"/>打籃球
    <input type="checkbox" checked="checked" value="電腦游戲"/>電腦游戲

上面的代碼,會(huì)將所有額checkbox的value輸出出來(lái)。若你想選擇選中項(xiàng),有三種寫(xiě)法:

$(':checkbox:checked').each(function() {
    alert($(this).val());
});
$('input[type=checkbox][checked]').each(function() {
    alert($(this).val());
});
$(':checked').each(function() {
    alert($(this).val());
});

5. :submit(取提交按鈕元素)

:submit選擇器和屬性選擇器$('input[type=submit]')等同

6. :reset(取重置按鈕元素)

:reset選擇器和屬性選擇器$('input[type=reset]')等同

7. :button(取按鈕元素)

:button選擇器和屬性選擇器$('input[type=button]')等同

8. :file(取上傳域元素)

:file選擇器和屬性選擇器$('input[type=file]')等同

9. :hidden(取不可見(jiàn)元素)

:hidden選擇器和屬性選擇器$('input[type=hidden]')等同

以上就是jQuery選擇器的全部?jī)?nèi)容了,是不是很全面?如有遺漏的,請(qǐng)告之一下,本文持續(xù)更新。

相關(guān)文章

  • JQuery為textarea添加maxlength屬性并且兼容IE

    JQuery為textarea添加maxlength屬性并且兼容IE

    textarea默認(rèn)不支持maxlength屬性,JQuery為textarea添加maxlength,并且兼容IE,具體實(shí)現(xiàn)祥看本文,希望可以幫助到你
    2013-04-04
  • 淺談jquery中ajax跨域提交的時(shí)候會(huì)有2次請(qǐng)求的問(wèn)題

    淺談jquery中ajax跨域提交的時(shí)候會(huì)有2次請(qǐng)求的問(wèn)題

    下面小編就為大家?guī)?lái)一篇淺談jquery中ajax跨域提交的時(shí)候會(huì)有2次請(qǐng)求的問(wèn)題。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2017-11-11
  • jquery實(shí)現(xiàn)呼吸輪播效果

    jquery實(shí)現(xiàn)呼吸輪播效果

    這篇文章主要為大家詳細(xì)介紹了jquery實(shí)現(xiàn)呼吸輪播效果,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2021-10-10
  • jQuery學(xué)習(xí)總結(jié)之jQuery事件

    jQuery學(xué)習(xí)總結(jié)之jQuery事件

    今天總結(jié)一下jQuery事件,這是比較重要的一塊,希望本次總結(jié)能幫助到很多同我一樣的新手
    2014-06-06
  • jquery 實(shí)現(xiàn)兩級(jí)導(dǎo)航菜單附效果圖

    jquery 實(shí)現(xiàn)兩級(jí)導(dǎo)航菜單附效果圖

    兩級(jí)導(dǎo)航菜單在網(wǎng)頁(yè)中非常實(shí)用,實(shí)現(xiàn)的方法也有很多,本文為大家介紹下使用jquery是如何實(shí)現(xiàn)的
    2014-03-03
  • jQuery表單元素選擇器代碼實(shí)例

    jQuery表單元素選擇器代碼實(shí)例

    這篇文章主要為大家詳細(xì)介紹了jQuery表單元素選擇器代碼實(shí)例,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-02-02
  • jQuery提交表單ajax查詢(xún)實(shí)例代碼

    jQuery提交表單ajax查詢(xún)實(shí)例代碼

    用戶(hù)輸入一個(gè)表單,輸入準(zhǔn)考證和驗(yàn)證碼,驗(yàn)證用戶(hù)是否輸入表單,點(diǎn)擊查詢(xún)提交,然后從服務(wù)器得到返回的數(shù)據(jù)并顯示出來(lái)
    2012-10-10
  • jQuery樣式操作方法整理介紹

    jQuery樣式操作方法整理介紹

    這篇文章主要介紹了jQuery樣式操作方法,并通過(guò)實(shí)際案例更淺顯的理解,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧
    2022-10-10
  • jquery星級(jí)插件、支持頁(yè)面中多次使用

    jquery星級(jí)插件、支持頁(yè)面中多次使用

    一個(gè)關(guān)于jquery星級(jí)插件的博文,那是我從網(wǎng)上收集的,它只支持一個(gè)頁(yè)面中使用一次,多次使用的話會(huì)發(fā)生沖突,達(dá)不到我項(xiàng)目的需求,沒(méi)辦法,只能修改它
    2012-03-03
  • 基于Jquery實(shí)現(xiàn)表單驗(yàn)證

    基于Jquery實(shí)現(xiàn)表單驗(yàn)證

    本文給大家分享的是一段基于Jquery實(shí)現(xiàn)表單驗(yàn)證的代碼,非常簡(jiǎn)單實(shí)用,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2015-08-08

最新評(píng)論