jQuery 是一套 JavaScript 的 Library,目的是簡化dom的操作,也可以說是簡化HTML與JavaScript之間的操作

基本規則:jQuery物件.方法( ).方法( )

具名函數

var person = new Object();
person.Name = "Bob";
person.Speak = say;

function say(msg) {
    alert(this.Name + ": " + msg);
}
person.Speak("Fuck You Jex");

不具名函數

var person = new Object();
person.Name = "Bob";
person.Speak = function (msg) { alert(this.Name + ": " + msg); }

person.Speak("Fuck You Jex");

2013-9-15 下午 05-26-04.jpg

Reference: http://msdn.microsoft.com/zh-tw/asp.net/dd452439.aspx