DIV CSS 佈局教程網

jQuery 基本語法
編輯:JQuery常見問題     

jQuery 的基本語法為 $(selector).action()。美元符號代表 jQuery 物件,selector 負責選取元素,action 則是對元素執行的操作。

$(this).hide();
$("p").hide();
$("p.test").hide();
$("#test").hide();

常見寫法是將程式碼放在 ready 事件中,確保 DOM 完成後再執行:

$(document).ready(function(){
  $("button").click(function(){
    $("#test").hide();
  });
});
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved