jQuery inheritance 상속 구현하기 . ~~
/** * Object Speaker * An object representing a person who speaks. */ var Speaker = { init: function(options, elem) { // Mix in the passed in options with the default options this.options = $.extend({},this.options,options); // Save the element reference, both as a jQuery // reference and a normal reference this.elem = elem; this.$elem = $(elem); // Build the dom initial structure this._build();..
카테고리 없음
2011. 10. 25. 17:02
Javascript Literals 표기 비교
Built-in Literals var o= new object(); var o={} var a= new array(); var a = []; var re= new RegExp( "[a-z]", "g"); var re=/[a-z]/g; var s = new String var s = ""; var n = new Number(); var n = 0; var b = new Boolean(); var b = false; throw new Error("uh-oh"); throw { name : "Error", message : "uh-oh" }; or throw Error("uh-oh");
웹개발/Javascript
2011. 10. 21. 14:59