[attribute!=value]

創(chuàng)新互聯(lián)公司是一家專注于成都網(wǎng)站制作、成都網(wǎng)站設計與策劃設計,鉛山網(wǎng)站建設哪家好?創(chuàng)新互聯(lián)公司做網(wǎng)站,專注于網(wǎng)站建設10多年,網(wǎng)設計領域的專業(yè)建站公司;建站業(yè)務涵蓋:鉛山等地區(qū)。鉛山做網(wǎng)站價格咨詢:18982081108
概述
匹配所有不含有指定的屬性,或者屬性不等于特定值的元素。
此選擇器等價于:not([attr=value])
要匹配含有特定屬性但不等于特定值的元素,請使用[attr]:not([attr=value])
參數(shù)
attributeString屬性名
value (可選)String屬性值。引號在大多數(shù)情況下是可選的。但在遇到諸如屬性值包含"]"時,用以避免沖突。
示例
描述:
查找所有 name 屬性不是 newsletter 的 input 元素
HTML 代碼:
input type="checkbox" name="newsletter" value="Hot Fuzz" /
input type="checkbox" name="newsletter" value="Cold Fusion" /
input type="checkbox" name="accept" value="Evil Plans" /jQuery 代碼:
$("input[name!='newsletter']").attr("checked", true);結果:
[ input type="checkbox" name="accept" value="Evil Plans" checked="true" / ]
Js代碼??
1 、$('li').not(':even').css('background-color',?'red');
Js代碼??
1、 $('li').not(document.getElementById('notli'))
2 ?、 .css('background-color',?'red');
Js代碼??
1、 $("div").not(".green,?#blueone")
2 、 ? ? ? ? ?.css("border-color",?"red");
Js代碼??
1 、Example:?Removes?the?element?with?the?ID?"selected"?from?the?set?of?all?paragraphs.
2、 $("p").not(?$("#selected")[0]?) ?。
3 、Example:?Removes?the?element?with?the?ID?"selected"?from?the?set?of?all?paragraphs.
4 、$("p").not("#selected") ?。
5 、Example:?Removes?all?elements?that?match?"div?p.selected"?from?the?total?set?of?all?paragraphs.
6 、$("p").not($("div?p.selected")) ?。
Js代碼??
1、 $("#reset").click(function()?{ ?。
2 、 ?$(':input','#fundingpossibility') ?。
$("#id").find("img").length
==
不包含img標記的標簽
高級點的
div
span1/span
/div
div
p1/p
/div
div
p1/p
/div
$("div:not(:has(span))")
;//選中div
節(jié)點下不包含span標記的div元素
網(wǎng)站名稱:jquery不包含,jquery對象不支持此屬性或方法
文章鏈接:http://chinadenli.net/article3/dsehdos.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站收錄、手機網(wǎng)站建設、企業(yè)網(wǎng)站制作、網(wǎng)站排名、網(wǎng)頁設計公司、云服務器
聲明:本網(wǎng)站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)