abstract:經(jīng)過(guò)兩節(jié)課對(duì)jQuery基本了解總結(jié)下:.jQuery是對(duì)js的封裝,通過(guò)到j(luò)Query官網(wǎng)下載js庫(kù)文件到項(xiàng)目錄里后直接引入。用jQuery時(shí)在<script><>/script>標(biāo)簽內(nèi)寫入。$(document).ready(function(){ //在此處輸寫jQuery代碼; })在輸寫代碼定義變量、選擇器前加
經(jīng)過(guò)兩節(jié)課對(duì)jQuery基本了解總結(jié)下:
.jQuery是對(duì)js的封裝,通過(guò)到j(luò)Query官網(wǎng)下載js庫(kù)文件到項(xiàng)目錄里后直接引入。
用jQuery時(shí)在<script><>/script>標(biāo)簽內(nèi)寫入。
$(document).ready(function(){ //在此處輸寫jQuery代碼; })
在輸寫代碼定義變量、選擇器前加$符;
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> <script type="text/javascript" src="jquery-3.3.1.js"></script> </head> <script type="text/javascript"> $(document).ready(function(){ $str="php中文網(wǎng)"; $("div").hide(); $("button").click(function(){ $("div").show(); }) }) </script> <body> <div style = "width:100px;height:100px;background:#ccc;"></div> <button>點(diǎn)這</button> </body> </html>
Correcting teacher:天蓬老師Correction time:2018-12-05 09:19:33
Teacher's summary:jquery 最常用在DOM操作 , 和Ajax操作上, 在后面的章節(jié)中,會(huì)有詳細(xì)說(shuō)明