随笔分类 -  WebJs

深入理解javascript原型和闭包(15)——闭包
摘要:http://www.cnblogs.com/wangfupeng1988/p/3994065.html深入理解javascript原型和闭包(15)——闭包 阅读全文
posted @ 2014-09-26 21:42 叶城宇 阅读(155) 评论(0) 推荐(0)
html网页小图标
摘要: 阅读全文
posted @ 2014-09-24 09:19 叶城宇 阅读(231) 评论(0) 推荐(0)
java例子
摘要:http://java2s.com/ 阅读全文
posted @ 2013-09-21 15:35 叶城宇 阅读(113) 评论(0) 推荐(0)
js 定义hash类
摘要:// JavaScript Documentfunction HashTable(){ this._hash={}; this._count=0; /** *添加或者更新key */ this.put=function(key,value){ if(this._hash.hasOwnProperty(key)){ this._hash[key]=value; return true; }else{ this._hash[key]=value; this._count++; return true; } } /** *获取key指定的值 */ this.... 阅读全文
posted @ 2013-09-15 09:47 叶城宇 阅读(651) 评论(0) 推荐(0)
ajax随笔(局部刷新)
摘要:$(function() { $("#menu a").live("click", function() { var isLeaf = true; if ($(this).parent().parent().hasClass("nav")) { if ($(this).parent().find('ul').hasClass("subnav")) { isLeaf = false; alert("cuole"); } else { isLeaf = true; alert(&qu 阅读全文
posted @ 2013-04-12 17:20 叶城宇 阅读(143) 评论(0) 推荐(0)
局部刷新定位
摘要:$(function() { $("#menu li a").click(function() { $("#content").empty(); var navId = $(this).attr("id"); $.getScript("../、、、/、、、/" + navId.substring(4, navId.length) + ".js"); setLocation(navId); }); var location = getLocation(); $("#" + lo 阅读全文
posted @ 2013-04-10 15:43 叶城宇 阅读(149) 评论(0) 推荐(0)
表格分页
摘要:jQuery.fn.JsonToTable = function(json, title, editable, isPaged) { var Obj; //存储json数据 var Title = title; //表格的列名数组 var Editable = editable; //列是否可编辑数组 var TableHtml = ''; //表格html代码 var PAGE_SIZE = 10; //每页显示的行数 var totalRowNum = 0; //总的行数 var i; if ((typeof(JSON) == "undefined")) 阅读全文
posted @ 2013-04-09 20:43 叶城宇 阅读(219) 评论(0) 推荐(0)
动态添加Jss和Css
摘要:function addJs(jsPath) { var oHead = document.getElementsByTagName('HEAD').item(0); var oScript= document.createElement("script"); oScript.type = "text/javascript"; oScript.src=jsPath; oHead.appendChild(oScript); } function addCss(CssPath) { var oHead = document.getElemen 阅读全文
posted @ 2013-03-16 09:25 叶城宇 阅读(285) 评论(0) 推荐(0)