摘要:
1. Ajax call Asp.net MVC actionfunction save() { var data = { 'Name': $('#name').val(), 'Age': $('#age').val() }; $.ajax({ url: '/user/Detail', //'@Url.Action("Detail", "user")', data: JSON.stringify(data), type: 'POST', con 阅读全文
摘要:
http://yui.2clics.net/ 阅读全文
摘要:
IE就是一坨屎 不要使用原生的Javascript去画HTML. 使用类库,比如Juqery. 千万别手贱!原因之一 JS 通过CreateElement 动态生成的代码,使用setAttribute插入已有CSS样式不起作用 (IE 6 - 8). 阅读全文
摘要:
Refer to http://stackoverflow.com/questions/94037/convert-character-to-ascii-code-in-javascriptThe second answer"ABC".charCodeAt(0)// returns 65String.fromCharCode(65,66,67);// returns 'ABC' 阅读全文
摘要:
Reference from http://www.codeproject.com/Articles/18148/SQL-Server-2005-Paging-ResultsWith Cust AS ( SELECT CustomerID, CompanyName, ROW_NUMBER() OVER (order by CompanyName) as RowNumber FROM Customers )select *from CustWhere RowNumber Between 20 and 30 阅读全文
摘要:
The slice() method selects the elements starting at the given start argument, and ends at, but does not include, the given end argument.1. Array.prototype.removeAt = function (index) { var part1 = this.slice(0, index); var part2 = this.slice(index + 1); return part1.concat(part2);}var a = [10, 11,12 阅读全文
摘要:
Refer to http://stackoverflow.com/questions/122102/what-is-the-most-efficient-way-to-clone-a-javascript-object// Shallow copyvar newObject = jQuery.extend({}, oldObject);// Deep copyvar newObject = jQuery.extend(true,{}, oldObject); 阅读全文
摘要:
C:\Documents and Settings\<user account>\Local Settings\Application Data\Microsoft\Outlook 阅读全文
摘要:
refer to http://stackoverflow.com/questions/2190850/javascript-create-custom-callbackfunctionThing(name){ this.name = name;}Thing.prototype.doSomething =function(callback, salutation){ // Call our callback, but using our own instance as the context callback.call(this, salutation);}function foo(sa... 阅读全文
摘要:
Part of the code refer to http://hi.baidu.com/ligq/blog/item/103115df9cdc390563279800.html MyClass = function () { var param = 2; // private this.m = 3; // public MyClass.staticCount = 5; // static this.publicMethod = function () { alert(param); // "this" is function publicMethod, invoke c 阅读全文