




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、jquery的學(xué)習(xí)練習(xí)從基礎(chǔ)開始結(jié)合事件的小練習(xí)屬性選擇器標(biāo)簽選擇器id選擇器類選擇器基本過濾選擇器demol<% page language=ffjc7van imporhjava.util*" pageencoding="iso-8859-1"%><!doctype html public ,-/w3c/dtd html 4.01 transitional/enh> <html><head><title>my jsp 1jqueryjsp1 starting page</title><
2、;meta http-equiv=npr(7gman content二"no-cac/7e"><meta http-equiv= ucache-controln content二fo-cache"<meta http-equiv= expires,r content="0"><meta http-equiv= ukeywordsn content feywordl, beyword2, keywords"><meta http-equiv="descriptionu content二
3、"this is my page" <! -<link re二"stylesheet:” type=,text/css" href="styles.css"><script type二"text/jaizasc氏pt" src=r ./js/jquery-3.0.0.jsnx/script> <script type二"text/ja/asc廠$(document)ready(function()$(h button n).cli c k(function()$(?).
4、hide();););</script></head><body><h2>this is a heading</h2><p>this is a paragraph</p><p>this is another paragraph</p><button type二"button">click me</button</body></html>demo2<% page language="jaua" impo
5、rt=''java.util* pageencoding=nutf-8"%><!doctype html public h-/w3c/dtd html 4.01 transitional/enu> <html><head><title>my jsp 'jquerydemo.jsp* starting page</title><meta http-equiv=uprag/wc7r, content=°nocache"><meta http-equiv= &qu
6、ot;cachecontrol" content"nocache"<meta http-equiv= expiresu content=n0,f><meta httpequiv="keywords" content="heywordl,heyword2,keywords"><meta http-equiv="description" content="this is my pagen> <!<link rel="stylesheet&qu
7、ot; type=htext/css" href=,styles.css"> -><script type="text/javascript" src="/js/jquery-300js"></script><script type="t:ext/javascript" >$(document) ready(function()/點(diǎn)擊strong標(biāo)簽選擇器設(shè)置字體顏色的樣式$("strong") click(function() $(,strong
8、,).attr(,style,/,color:#00ff99n);/設(shè)置 strong標(biāo)簽的顏右屬性);點(diǎn)擊tags帶有類的屬性值后代選擇器里面的內(nèi)容加粗$(".tags").click(function()$(".tags font"j.cssc'font-weight"/,boldh););/標(biāo)簽選擇器點(diǎn)擊事件$(“input”)click(function()使用屬性選擇器$(,alt=* 收藏alert("您已收藏成功!"););為ul設(shè)置樣式$(,ul,).css(,list-style,/,noneu);
9、/點(diǎn)擊hl的事件$(nhl").click(function()$(,.tt,).css(,font-size,': "upk"/'font-weight": "bold'ine-he ight,:,24pxh);$(” tt”)addclasscmyol'*);$(”#myol')hide(););$(hh2n).click(function() $(”#myol')show(););/設(shè)置td的內(nèi)容居中$("table"). attr("align11, &quo
10、t;centerm);$("td")attrcalign"/*center");/隔行變色$("tr:odd").not(":first") css("background-color""orange"););</script></head><body><strong>非緣勿擾(共36集)</strong><ul><li class二"tags">主演:<font&g
11、t;蘇有朋、秦嵐</fontx/li><li class="tags ">導(dǎo)演:<font>賴水清</fontx/li><li class二"tags"標(biāo)簽:<font>國(guó)產(chǎn)電視連續(xù)劇、蘇有朋</fontx/li></ul><br/><input type=nbutton"收藏,value="敗堿'"><hr/><hl>新手指南</hl><ol class=&qu
12、ot;tt" id=5yo><li>會(huì)員注冊(cè)</li><li>訂閱更新</li><li>用戶協(xié)議</li><li>常見問題</li></ol><h2>顯示隱藏內(nèi)容</h2><t able bor der="lpx solid orange" cellpadding二"0" cellspaci ng 二"0" width二"50%" height=n150px
13、76;><tr><th>百度外賣</th><th>夢(mèng)幻西游</th><th>紅米手機(jī)</th><t“><td>劉詩(shī)詩(shī)</td><td>劉詩(shī)詩(shī)</td><td>劉詩(shī)詩(shī)</td></tr><tr><td> 小獅 了y/td><td>小獅子</td><td>小獅子</td><tr><td>劉詩(shī)詩(shī)</td>
14、<td>劉詩(shī)詩(shī)</td><td>劉詩(shī)詩(shī)</td><tr><td>劉詩(shī)詩(shī)</td><td>劉詩(shī)詩(shī)</td><td>劉詩(shī)詩(shī)</td></tr><tr><td>劉詩(shī)詩(shī)</td><t d>劉詩(shī)詩(shī)</td><td>劉詩(shī)詩(shī)</td></tr><tr><td>劉詩(shī)詩(shī)</td><td>劉詩(shī)詩(shī)</td><td&
15、gt;劉詩(shī)詩(shī)</td></table></body></html>demo3隱藏和顯示的各種用法<% page language=rljavarf impor* pageencoding=nutf-8"%><!doctype html public ,-/w3c/dtd html 4.01 transitional/enn> <html><head><title>my dsp 1hideandshow.jsp1 starting page</title<meta h
16、ttpequiv二"p廠aga" content=uno-cachen><meta httpequiv= ucache-controln content二"no-cache"><meta http-equiv= ''expires n content二"0"><meta http-equiv= ''keywords h content二"heywordl, heyword2, keya)ord3 "><meta http-equiv=n
17、descriptionr, content=nthis is my pagen><! 一<link il=hstylesheet" type=htext/css" href=,styles.css"> -><style type="£ext/css">prebackground-color: #b9e4f2border:lpx solid #c1b5f4; di/.hideandshoia/ margin:0px;padding:5px;text-align:center; backgroun
18、d:#c1e8f4; border:lpx solid #c1b5f4; div#hideandshoheigh t: 120px; display:none;p-flipbackground:#92d6f9;</style><script type="text/jai/asc廠ipt"src=n./js/jquery-3.0.0.js"></script><script type二"text/jauasc廠ipt"> $(document)ready(function() $(h.flipn).
19、click(function() $(n#hideandshow") slidetoggle("slow");););隱藏和顯示的切換點(diǎn)擊隱藏點(diǎn)擊切換function change()$("class=,mydiv,").each(function() if($(this).is(,:hidden,) $(this)show();else $(this)hide(););function showd()var str="$(*':checked") .each(function() str+=$(this).val(
20、)+,/,j);$('showdiv") html=str;</script></head><body><div class="mydi/" style二"display:門o/ie">詩(shī)詩(shī)</div><div class="mydiv" style="display:btoe/?">劉吃吃</div> <input<hr/><input<input<input<input<inputtype=hbuttonn onclick=llchange()l,value=m,7>t
溫馨提示
- 1. 本站所有資源如無(wú)特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 剪紙課題立項(xiàng)申報(bào)書
- 事故車交易合同范本
- 上海嘉善房屋出租合同范本
- 高中課題申報(bào)書
- 課題申報(bào)書亮點(diǎn)
- 臨時(shí)用工勞務(wù)合同范本 三
- 勞務(wù)拆遷采購(gòu)合同范本
- 合同范本 材料價(jià)差調(diào)整
- 勞務(wù)公司包工合同范本
- 與中介簽買房合同范本
- 定語(yǔ)從句漢譯英
- 財(cái)政部金融企業(yè)不良資產(chǎn)批量轉(zhuǎn)讓管理辦法(財(cái)金[2012]6號(hào))
- 精品資料(2021-2022年收藏)建筑立面裝飾設(shè)計(jì)技術(shù)導(dǎo)則
- 倉(cāng)庫(kù)管理警示標(biāo)語(yǔ)
- ISO9001質(zhì)量管理體系目錄結(jié)構(gòu)
- 5米對(duì)數(shù)視力表及E尺寸標(biāo)準(zhǔn)A4
- 十三五全國(guó)眼健康規(guī)劃(2016-2020年)終期自評(píng)報(bào)告
- “十四五”交通運(yùn)輸發(fā)展規(guī)劃思路
- 人口變動(dòng)情況抽樣調(diào)查工作進(jìn)展情況匯報(bào)
- SBAR溝通模式在臨床中的應(yīng)用
- sd敢達(dá)去檢查改機(jī)教程
評(píng)論
0/150
提交評(píng)論