<!DOCTYPE HTML><HTML> <Head> <MetaCharSet= "Utf-8"> <title></title> <Scriptsrc= "Js/jquery.js"></Script> <Script>window.onload= function() {document.getElementById ('Btnok'). onclick= function(){ //1. Match the element with the Size property //$ (' font[size] '). HTML (' Test '); //2. A font element that matches a size that has a property value equal to 7 //$ (' font[size=7] '). HTML (' Test '); //3. Font elements that match attribute values not equal to 7 //$ (' font[size!=7] '). HTML (' Test '); //4. Match attribute values to the font element starting with re //$ (' font[color^=re] '). HTML (' Test '); //5. Match the font element with the attribute value ending with UE //$ (' font[color$=ue] '). HTML (' Test '); //6. Match Color property contains BL's font element //$ (' font[color*=bl] '). HTML (' Test '); //7. Match a FONT element that has both a color and a size property $('Font[size][color]'). HTML ('Test'); } } </Script> </Head> <Body> <inputtype= "button"ID= "Btnok"value= "Match" /> <HR> <Font>First Font Property</Font> <HR> <Fontsize= "7">Second font element with a size property</Font> <HR> <FontColor= "Red">Third font element, with a color property</Font> <HR> <Fontsize= "5"Color= "Blue">Fourth font element with both a size and a color property</Font> <HR> </Body></HTML>
Kill Thunder Dog jquery---6 property selector