abstrakt:經(jīng)過兩節(jié)課對jQuery基本了解總結(jié)下:.jQuery是對js的封裝,通過到j(luò)Query官網(wǎng)下載js庫文件到項目錄里后直接引入。用jQuery時在<script><>/script>標簽內(nèi)寫入。$(document).ready(function(){ //在此處輸寫jQuery代碼; })在輸寫代碼定義變量、選擇器前加
經(jīng)過兩節(jié)課對jQuery基本了解總結(jié)下:
.jQuery是對js的封裝,通過到j(luò)Query官網(wǎng)下載js庫文件到項目錄里后直接引入。
用jQuery時在<script><>/script>標簽內(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>點這</button> </body> </html>
Korrigierender Lehrer:天蓬老師Korrekturzeit:2018-12-05 09:19:33
Zusammenfassung des Lehrers:jquery 最常用在DOM操作 , 和Ajax操作上, 在后面的章節(jié)中,會有詳細說明