Presentation is loading. Please wait.

Presentation is loading. Please wait.

A New Kind of JavaScript Library

Similar presentations


Presentation on theme: "A New Kind of JavaScript Library"— Presentation transcript:

1 A New Kind of JavaScript Library

2 jQuery是什么? jQuery是继prototype之后又一个优秀的 Javascript框架
jQuery是轻量级的js库,兼容CSS3,还 兼容各种浏览器 (IE 6.0+, FF 2+, Safari 3.0+, Opera 9.0+, Chrome) 能快速,简洁的使用HTML documents, handle events, perform animations, 并且能把Ajax交互应用到网页。

3 Find it JavaScript jQuery document.getElementById(id)
var myElement = $(“#myId”); $(“div p”); $(“div #msg”);

4 分离JS与HTML JavaScript jQuery <body onload=“alert('hello');”>
$(document).ready(function(){ alert(“Hello World”); });

5 简化DOM脚本 Without jQuery With jQuery

6 $.ajax() $.ajax({ url : ‘document.xml’, type : ‘GET’; dateType : ‘xml’, error : function(){//do sth.}, success : fucntion(){//do sth.} });


Download ppt "A New Kind of JavaScript Library"

Similar presentations


Ads by Google