Copy codeThe Code is as follows:
$ (Function (){
/*
// $ ("Html body div table. table_list tbody tr "). not (": has ('td a img [src * javastj.gif] ')"). mouseover (function (){
$ ("Html body div table. table_list tbody tr: not (': has ('td a img [src * javastj.gif]')"). mouseover (function (){
// Alert ($ (this) [0]. style. backgroundColor );
Certificate (this).css ("backgroundColor", "66 CCFF"); // "red" # f8fbfd"
$ (This). mouseout (function (){
Certificate (this).css ("backgroundColor", ""); // $ (this) [0]. style. backgroundColor = "";
});
});
*/
Var tr2 = $ ("table. table_list tr: not (': has ('td a img [src * using tj.gif]')");
Tr2.mouseover (function (){
Certificate (this).css ("backgroundColor", "66 CCFF ");
})
Tr2.mouseout (function (){
Certificate (this).css ("backgroundColor ","");
})
})
The code above highlights rows in a table that do not submit images when hovering
I first asked a question on bbs: Click to open the link
The answer is not satisfactory. I just want to learn more about jquery. Find This * = and in the Quick query manual in the appendix! = Contains and does not contain.
This line
Copy codeThe Code is as follows:
Var tr2 = $ ("table. table_list tr: not (': has ('td a img [src * using tj.gif]')");
Not, you can add another function has. Because tr is required to change color, img is not required to change color, so tr td a img [src! Required tj.gif] Always use quotation marks. Question: What should I do if there are three-layer quotation marks? Or single quotes?
Question: Why can tj.gif be used without quotation marks?
Copy codeThe Code is as follows:
[Src * javastj.gif
Is src?include A tj.gif string?
All can also be written as follows:
Copy codeThe Code is as follows:
Var tr2 = $ ("table. table_list tr"). not (': has ('td a img [src * using tj.gif]');
So I suspect that: in the selector represents the call selector.
Download: unzip the package and find main1, caiji, and task_send.html.