摘要:<!DOCTYPE html><html><head><meta charset="UTF-8"><title>jquery基礎語法</title> <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.j
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>jquery基礎語法</title> <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"> </script> </head> <body> <!-- 文檔就緒語法 $(document).ready(function(){ //jquery code }) --> <script> $(document).ready(function(){ //表單選擇器 $(':enabled').css('background','pink') $(':disabled').css('background','blue') }) </script> <form action=""> 輸入框1 <input type="text" name=""><br> 輸入框2 <input type="text" name=""><br> 輸入框3 <input type="text" name="" disabled><br> 輸入框4 <input type="text" name=""><br> </form> </body> </html>
批改老師:查無此人批改時間:2019-01-11 09:28:57
老師總結:基本語法沒什么問題。 注釋的那塊盡量刪掉,或者放在script標簽里面。 萬一注釋被刪掉,就會報錯了。加油