摘要:restify 是Node.js的模块。虽然restify的API或多或少的参考了express,但restify不是一个MVC框架,它是一套为了能够正确构建REST风格API而诞生的框架。http://roynotes.com/blog/2012/02/node-restify-intro/
阅读全文
随笔分类 - | Javascript |
摘要:$j(document).ready(function(){}); // 或者$j(function(){});第一个是直接使用Jquery调用function,第二个是在文档加载完毕后才去调用function
阅读全文
摘要:用js写了一个Map,带遍历功能,请大家点评下啦。//map.jsArray.prototype.remove = function(s) { for (var i = 0; i Test Map
阅读全文
摘要:var json = [{tcName:"11", children:[{tcName:"22", children:[{tcName:"33"}]}, {tcName:"44", children:[{tcName:"55"}, {tcName:"55"}]}]}]; readTree(json[0], $("#load")); function readTree(node, ul) { var li = $(["" + "
阅读全文
摘要:原文网址:http://www.nowamagic.net/html/html_EnterCouseReflesh.php我最近在做一个 Ajax 查询的功能,代码如下:[html]view plaincopy<formname="keywordForm"method="post"action=""><pid="profile_nav"><labelfor="profile">关键字搜索:</label><inputstyle="w
阅读全文
摘要:User-generated content on the Web is diversifying from plain text to multimedia content like images, audios and videos. As such, web applications and sites need to cater for easier upload and manipulation of such rich content. Image uploading is pretty much a requirement for a lot of websites and th
阅读全文
摘要:son对象复制代码代码如下:var json = {aa:true,bb:true};var json1 = {aa:'b',bb:{cc:true,dd:true}};1:js操作json对象复制代码代码如下:for(var item in json){alert(item); //结果是 aa,bb, 类型是 stringalert(typeof(item));alert(eval("json."+item)); //结果是true,true类型是booleaneval(("json."+item+"=false;"
阅读全文
摘要:http://www.w3school.com.cn/jquery/ajax_get.asp$("button").click(function(){ $.get("demo_ajax_load.txt", function(result){ $("div").html(result); });});
阅读全文
摘要:有时候需要获取页面的键盘值过滤,需要用到keycode如下keycode0 =keycode1 =keycode2 =keycode3 =keycode4 =keycode5 =keycode6 =keycode7 =keycode8 = BackSpace BackSpacekeycode9 = Tab Tabkeycode10 =keycode11 =keycode12 = Clearkeycode13 = Enterkeycode14 =keycode15 =keycode16 = Shift_Lkeycode17 = Control_Lkeycode18 = Alt_Lkeycode1
阅读全文
摘要:1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; c
阅读全文
摘要:These libraries provide many functions, whether the matter is related to events or effects or AJAX.http://coding.smashingmagazine.com/2009/03/02/40-stand-alone-javascript-libraries-for-specific-purposes/
阅读全文
摘要:Yahoo User Interface Library (YUI Library):YUI is a free, open source JavaScript and CSS library for building richly interactive web applications.Link : http://yuilibrary.com/EXTJS:With an advanced MVC architecture, plugin-free charting, and modern UI widgets, Sencha Ext JS is the industry's mos
阅读全文