在鏈接處添加 CSS 樣式表單及點擊鏈接後隱藏鏈接字樣功能 |
前往 jQuery 官方網站 |
下列是 jQuery 程式的內容: |
<HEAD> <script src="js/jquery-1.7.2.min.js"> <script> $(document).ready(function(){ $("a").click(function(event){ $(this).hide("slow"); }); }); </script> </HEAD> <BODY> <a href="http://jquery.com/">前往 jQuery 官方網站</a> <input type="button" onclick='javascript:$("a").addClass("test");' value="添加樣式" /> <input type="button" onclick='javascript:$("a").removeClass("test");' value="去掉樣式" /> </BODY> |
本報導資料來源:本資料取自知蟻博客 - 什麼是 jQuery?深入淺出介紹 jQuery 是如何工作的?
![]() |
![]() ![]() ![]() |
請按瀏覽器的檢視原始碼查看