代码改变世界

js The Yellow Fade Technique

2012-10-28 21:57 by youxin, 304 阅读, 0 推荐, 收藏,
摘要:http://37signals.com/svn/archives/000558.phphttp://www.cnblogs.com/QLeelulu/archive/2008/03/25/1120854.html效果请将鼠标移到任意的链接上就能看到下面直接看代码:fadeUp=function(e... 阅读全文

javascript中的toString()方法

2012-10-28 17:23 by youxin, 447 阅读, 0 推荐, 收藏,
摘要:javascript中的toString()方法,主要用于Array、Boolean、Date、Error、Function、Number等对象。下面是这些方法的一些解析和简单应用,做个纪律,以作备忘。(1)Array.toString():将数组转换成一个字符串,并且返回这个字符串。描述:当数组用于字符串环境中时,javascript会调用这一方法将数组自动转换成一个字符串。toString()在把数组转换成字符串时,首先要将数组的每个元素都转换成字符串(通过调用这些元素的toString方法)。当每个元素都被转换成字符串时,它就以列表的形式输出这些字符串,字符串之间用逗号分隔。返回值与没. 阅读全文

PHP中的$_SERVER['PATH_INFO']

2012-10-27 18:39 by youxin, 213 阅读, 0 推荐, 收藏,
摘要:PHP中的全局变量$_SERVER['PATH_INFO']是一个很有用的参数,众多的CMS系统在美化自己的URL的时候,都用到了这个参数。对于下面这个网址:http://www.test.com/index.php/foo/bar.html?c=index&m=search我们可以得到$_SERVER['PATH_INFO']= ‘/foo/bar.html’,而此时$_SERVER['QUERY_STRING']= 'c=index&m=search';通 常,我们最初开始PHP程序编写的时候,都会使用诸如: 阅读全文

css Replaced Elements

2012-10-27 16:09 by youxin, 340 阅读, 0 推荐, 收藏,
摘要:Areplaced elementis any element whose appearance and dimensions are defined by an external resource. Examples include images (<img>tags), plugins (<object>tags), and form elements (<button>,<textarea>,<input>, and<select>tags). All other elements types can be refe 阅读全文

Fast JavaScript Max/Min

2012-10-27 02:00 by youxin, 291 阅读, 0 推荐, 收藏,
摘要:via:john resighttp://ejohn.org/blog/fast-javascript-maxmin/I've been saving this technique for a while now - it's simple, but it's good. What's the fastest way to find the largest, or smallest, number in an array?There's a bunch of implementations floating around - including some 阅读全文

js+css Text Blocks Over Image(文字覆盖在图片上)

2012-10-27 01:58 by youxin, 1287 阅读, 0 推荐, 收藏,
摘要:html图表 A Movie in the Park:Kung Fu PandaPutting the image in as a background image of the wrapping div would be easier, but in this s... 阅读全文

精通javascript:永不终止的blog

2012-10-26 22:35 by youxin, 198 阅读, 0 推荐, 收藏,
摘要:一个完整的显示wordpress的rss源的程序,当用户滚动到页面底部时载入下一页。// A generic function for performming AJAX requests// It takes one argument, which is an object that contains a set of options// All of which are outline in the comments, belowfunction ajax( options ) { // Load the options object with defaults, if no /... 阅读全文

JS转义 escape()、encodeURI()、encodeURIComponent()区别详解

2012-10-26 22:28 by youxin, 337 阅读, 0 推荐, 收藏,
摘要:JavaScript中有三个可以对字符串编码的函数,分别是: escape,encodeURI,encodeURIComponent,相应3个解码函数:unescape,decodeURI,decodeURIComponent 。下面简单介绍一下它们的区别1 escape()函数定义和用法escape() 函数可对字符串进行编码,这样就可以在所有的计算机上读取该字符串。语法escape(string)参数 描述string 必需。要被转义或编码的字符串。返回值已编码的 string 的副本。其中某些字符被替换成了十六进制的转义序列。说明该方法不会对 ASCII 字母和数字进行编码,也不会对下面 阅读全文

精通javascript:ajax使用

2012-10-26 22:01 by youxin, 363 阅读, 0 推荐, 收藏,
摘要:数据串行化:要发送一系列的数据到服务器上,第一步要整理他的格式,使服务器易于读取,这一过程称为“串行化”。串行化有2种不同的情况,但都能满足多种不同的传输需求。1.传输一个常规的js对象,其中可能包含键/值(值可能是字符串或数字)2.从一系列的表单的输入栏中提交。这种情况和第一种情况的不同之处在于提交的元素要按顺序排列,而第一个情况可以任意排列.// A simple object holding key/value pairs{ name: "John", last: "Resig", city: "Cambridge", zip: 阅读全文

dom querySelector

2012-10-25 17:04 by youxin, 298 阅读, 0 推荐, 收藏,
摘要:element = document.querySelector(selectors); Returns the first element within the document (using depth-first pre-order traversal of the document's nodes) that matches the specified group of selectors.elementis anelementobject.selectorsis a string containing one or more CSS selectors separated b 阅读全文
上一页 1 ··· 201 202 203 204 205 206 207 208 209 ··· 269 下一页