jQuery使用總結-CorejQuery其他4/4
Core jQuery使用中其要注意的一些知識點
Events
$(`img`).bind(`click`,function(event){alert(`Hi there!`);});
$(function(){
$(`#example`)
.bind(`click`,function(event) {
say(`BOOM once!`);
})
.bind(`click`,function(event) {
say(`BOOM twice!`);
})
.bind(`click`,function(event) {
say(`BOOM three times!`);
});
});
$(`.whatever`).bind({
click: function(event) { /* handle clicks */ },
mouseenter: function(event) { /* handle mouseenters */ },
mouseleave: function(event) { /* handle mouseleaves */ }
});
注意.live的使用
在“jQuery 1.4.1 Cheat Sheet.chm”事件節有例子
Effect
處理元素的顯示效果
有 基本顯示、滑動、淡入淡出、字定義
在“jQuery 1.4.1 Cheat Sheet.chm”說明
Utility Functions
函式名都是jQuery. 即$. 開頭
有以下類別:瀏覽器及特性檢測、陣列和物件操作、函式操作、測試操作、字串操作、URL
在“jQuery 1.4.1 Cheat Sheet.chm”工具節
$.browser.version
$.merge( [0,1,2], [2,3,4] )
$.isArray([])
$.trim(" hello, how are you? ");
var params = { width:1680, height:1050 };
var str = jQuery.param(params);
$(“#results”).text(str);
AJAX
$.ajax({
type: “POST”,
url: “some.php”,
data: “name=John&location=Boston”,
success: function(msg){
alert( “Data Saved: ” + msg );
}
});
var html = $.ajax({
url: “some.php”,
async: false
}).responseText
$.getJSON("test.js", function(json){
alert("JSON Data: " + json.users[3].name);
});
關於jquery使用的其他3個內容點參考:
http://www.cnblogs.com/2018/archive/2010/10/12/1849238.html
http://www.cnblogs.com/2018/archive/2010/10/13/1849981.html
http://www.cnblogs.com/2018/archive/2010/10/13/1849982.html
相關文章
- jQuery使用總結-CorejQuerySelectors選擇器二3/4jQuery
- dom4j使用總結
- log4j使用總結
- JQuery使用總結jQuery
- Spring Test 整合 JUnit 4 使用總結Spring
- shell學習總結-4
- 健身4個月總結
- 4月10號總結
- 4月16號總結
- Log4j使用總結與例項演示
- Mongodb總結4-Spring環境使用MongodbMongoDBSpring
- 4月7日每日總結
- 4月12日每日總結
- 4月11日每日總結
- 4月15日每日總結
- 4月14日每日總結
- 4月13日每日總結
- 4月10日每日總結
- 4月9日每日總結
- CLUSTER內部結構的總結(4)
- webpack4系列教程(十):總結Web
- Nginx 學習總結(4)—— Rewrite 模組Nginx
- jquery總結jQuery
- C++日誌系統log4cxx使用總結C++
- MySQL深入研究--學習總結(4)MySql
- net中的4種事務總結
- 專案(FBMS)總結-管理篇(4)
- jquery 總結(1)jQuery
- Flex4 AS3的簡單繫結總結FlexS3
- Eclipse初次java開發問題總結-4-Maven使用問題彙總EclipseJavaMaven
- 4年使用經驗,總結Django一些開發經驗Django
- 【轉載】crawler4j簡單總結
- Windows密碼破解4方法總結Windows密碼
- 學習SSD4的一點總結
- SQL總結(三)其他查詢SQL
- 使用tensorflow2識別4位驗證碼及思考總結
- Spring Boot學習總結(4)——使用Springloaded進行熱部署Spring Boot熱部署
- JQuery知識總結jQuery