1 <!DOCTYPE HTML>2 <HTMLLang= "en">3 <Head>4 <MetaCharSet= "UTF-8">5 <title>Document</title>6 <Scripttype= "Text/javascript"src= "D:/jquery2.0/jquery-2.0.0.js"></Script>7 <Scripttype= "Text/javascript">8 $ (document). Ready (function(){9 Alert ("Hello");Ten }); One </Script> A <Scripttype= "Text/javascript"> - $ (document). Ready (function(){ - var$CR= $("#cr"); the varCR=$CR [0]; - $CR. Click (function(){ - if(cr.checked) { - Alert ("Thank you!"); + } - }) + }); A </Script> at <Scripttype= "Text/javascript"> - $ (document). Ready (function(){ - varCR=document.getElementById ("CR"); - var$CR=$ (CR); - $CR. Click (function(){ - if($CR. Is (": Checked")){ in Alert ("hello,world!"); - } to }) + }); - </Script> the </Head> * <Body> $ <inputtype= "checkbox"class= "Cr"ID= "Cr"/><label for= "Cr">Do you agree to the above terms?</label>Panax Notoginseng </Body> - </HTML>
The conversion between the JQuery object and the DOM object that I learned last night was not very difficult. Feel jquery is a little better than JS.
Never Give up!