GeorgeWang地字3号

JQuery、Node.js http://www.pecloud.cn/

导航

2011年2月20日

jquery 保持div的列高度相同

摘要: $(document).ready(function() { function equalHeight(group) { tallest = 0; group.each(function() { thisHeight = $(this).height(); if (thisHeight > tallest) { tallest = thisHeight; } }); group.height(tallest);}// how to use$(document).ready(function() { equalHeight($(".left")); equalHeight($(".r 阅读全文

posted @ 2011-02-20 14:09 GeorgeWang 阅读(178) 评论(0) 推荐(0) 编辑

jquery 预加载图片

摘要: $(document).ready(function() { jQuery.preloadImages = function() { for(var i = 0; i < arguments.length; i++) { $("<img>").attr("src", arguments[i]); }}// how to use$.preloadImages("image1.jpg");}); 阅读全文

posted @ 2011-02-20 14:09 GeorgeWang 阅读(188) 评论(0) 推荐(0) 编辑

jquery font resizing

摘要: $(document).ready(function() { // Reset the font size(back to default)var originalFontSize = $('html').css('font-size');$(".resetFont").click(function() { $('html').css('font-size', originalFontSize);});// Increase the font size(bigger font0$(".increaseFont").click(function() { var currentFontSize = 阅读全文

posted @ 2011-02-20 14:08 GeorgeWang 阅读(170) 评论(0) 推荐(0) 编辑

jquery page top

摘要: $(document).ready(function() { $('a[href*=#]').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var $target = $(this.hash); $target = $target.length && $target || $('[name=' + this.hash.slice(1) + 阅读全文

posted @ 2011-02-20 14:07 GeorgeWang 阅读(403) 评论(0) 推荐(0) 编辑

jquery 验证元素是否存在

摘要: $(document).ready(function() { if ($('#id').length) { // do something}}); 阅读全文

posted @ 2011-02-20 14:05 GeorgeWang 阅读(200) 评论(0) 推荐(1) 编辑

jquery 元素居中间

摘要: $(document).ready(function() { jQuery.fn.center = function() { this.css("position","absolute"); this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px"); this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px"); return this;}$("#id").ce 阅读全文

posted @ 2011-02-20 14:05 GeorgeWang 阅读(301) 评论(0) 推荐(0) 编辑

jquery 得到html中元素的数量

摘要: $(document).ready(function() {$("p").size();}); 阅读全文

posted @ 2011-02-20 14:04 GeorgeWang 阅读(438) 评论(0) 推荐(0) 编辑

jquery 获得鼠标指针 X/Y 值

摘要: $(document).ready(function() { $().mousemove(function(e) { // display the x and y axis values inside the div with the id XY $('#XY').html("X Axis : " + e.pageX + " | Y Axis " + e.pageY);});});<div id="XY"></div> 阅读全文

posted @ 2011-02-20 14:03 GeorgeWang 阅读(314) 评论(0) 推荐(0) 编辑

Node.js简介:可独立于浏览器,运行于服务器的Javascript

摘要: Node.js包罗万象,但最主要的一点是,它提供了一种在Web浏览器之外运行Javascript的途径。Javascript广泛应用于网站的前端开发。Node使得这种流行的编程语言能够在更多环境下运行,甚至是网站的服务器端。它有几个值得我们关注的特性:Node是一个Javascript运行环境(runtime)。实际上它是对Google V8引擎(应用于Google Chrome浏览器)进行了封装。V8引 擎执行Javascript的速度非常快,性能非常好。Node对一些特殊用例进行了优化,提供了替代的API,使得V8在非浏览器环境下运行得更好。例 如,在服务器环境中,处理二进制数据通常是必不 阅读全文

posted @ 2011-02-20 13:54 GeorgeWang 阅读(569) 评论(0) 推荐(0) 编辑

2010年8月3日

PowerDesigner数据库设计中的14个实用技巧

摘要: 下述十四个技巧,是许多人在大量的数据库分析与设计实践中,逐步总结出来的。对于这些经验的运用,读者不能生帮硬套,死记硬背,而要消化理解,实事求是,灵活掌握。并逐步做到:在应用中发展,在发展中应用。   1. 原始单据与实体之间的关系  可以是一对一、一对多、多对多的关系。在一般情况下,它们是一对一的关系:即一张原始单据对应且只对应一个实体。在特殊情况下,它们可能是一对多或多对一的关系,即一张原始单证... 阅读全文

posted @ 2010-08-03 13:23 GeorgeWang 阅读(858) 评论(0) 推荐(0) 编辑