js

TwitterFacebook
Get flash to fully experience Pearltrees
game

IE和FireFox在js和css的23处不同点(转贴) - Java世界

1.document.formName.item("itemName") 问题 问题说明:IE下,可以使用 document.formName.item("itemName") 或 document.formName.elements ["elementName"];Firefox下,只能使用document.formName.elements["elementName"]。 解决方法:统一使用document.formName.elements["elementName"]。 2.集合类对象问题 问题说明:IE下,可以使用 () 或 [] 获取集合类对象;Firefox下,只能使用 [ ]获取集合类对象。 解决方法:统一使用 [] 获取集合类对象。 3.自定义属性问题 问题说明:IE下,可以使用获取常规属性的方法来获取自定义属性,也可以使用 getAttribute() 获取自定义属性;Firefox下,只能使用 getAttribute() 获取自定义属性。 http://www.blogjava.net/rabbit/archive/2009/01/20/252016.html
如果只是页面上非FORM中元素的SELECTED,就没那么复杂,看这个:http://www.quirksmode.org/js/selected.html 代码: 引用 <script language="javascript"> var agt=navigator.userAgent.toLowerCase(); var ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1) && (agt.indexOf("omniweb") == -1)); function a(){ var myArea = document.getElementById("s"); var selection; if (!ie){ if (myArea.selectionStart! http://blog.csai.cn/user1/15087/archives/2006/5659.html

取得input元素中部分选中(selected)的值for IE and Firefox--漫步者 - 希赛IT博客,中国最大的

web.Frontend :: random things :: July :: 2006

http://old9.blogsome.com/2006/07/23/random-things-4/ CSS Browser Selector ,通过 一个 JS 判断用户的浏览器类型,来给 元素添加 class。之后就可以在 CSS 中利用形如 .gecko .mydiv{} 的方法来给 gecko 写专门样式了。 不过它判断的是浏览器发送的头信息,要知道这个信息是可以伪装的…… Javascript Sound Kit ,又一个利用 Javascript 和 Flash 结合的应用,给网页中添加音效。 前段时间的项目发现,关于使用 11px 的 Mingliu 字体,各浏览器都有些不同。 IE:如果未指定语言(lang 属性),使用utf-8 就可以使用 Mingliu 字体,如果 html 中指定了语言为 zh-cn,那么使用 utf-8 也不行,只有另行再赋值 zh-tw(或 zh-hk) 到特定元素的 lang 属性才行,而对于 IE5,我测试的是要把字体加一号,font-size 设置为 12px 才行,奇怪;

JavaScript中的类继承(一) - lycboy - 新浪BLOG

http://blog.sina.com.cn/s/blog_538171a3010001x8.html Douglas Crockford www.crockford.com 翻译 ShiningRay www.nirvanastudio.org And you think you're so clever and classless and free
http://thinhunan.cnblogs.com/archive/2006/04/01/developernotesforprototype.html#Reference.ObjectRange

博客园 - The shortest answer is doing - prototype.js 1.4版开发者手册(强烈推荐

last update: March 30th 2006 中文版: THIN 最后更新:2006-3-31
script.aculo.us is a set of JavaScript libraries to enhance the user interface of web sites. It provides an visual effects engine, a drag and drop library (including sortable lists), a couple of controls (Ajax-based autocompletion, in-place editing, sliders) and more. Be sure to have a look at the demos ! API Documentation and Reference http://madrobby.github.com/scriptaculous/

Prototype in scriptaculous wiki

youngpup.net

http://webapp.youngpup.net/?request=/components/dom-drag.xml&amp;xpath=/project/documentation aaronboodman.com Hi, I'm Aaron Boodman. I created Greasemonkey and was a technical lead on Chrome . I live in San Francisco with Susan , Stimpy , and Miles . In my spare time, I like to snowboard, travel, and ride my motorcycle . Projects Articles Elsewhere
Overview Lightbox JS is a simple, unobtrusive script used to overlay images on the current page. It's a snap to setup and works on all modern browsers . Note: An new version of this script is available: Lightbox JS v2.0 Example To make sense of it all, check out these examples.

Lightbox JS

http://lokeshdhakar.com/projects/lightbox/
http://www.bobbyvandersluis.com/articles/javascript_good_practices/index.html 1. Make sure your JavaScript code is in balance with its environment Web Standards are a three-legged stool , or without metaphors, a threesome of technologies that should live together in harmony. (X)HTML adds structure and semantics to your content, CSS is responsible for its presentation, and the DOM provides an interface to add behavior.

Ten good practices for writing JavaScript in 2005

本文是本人通过个人理解所写成的,没有参照任何资料,如有雷同,纯属巧合,同时,如果您要引用本文文字,请注明 — 作者:windy_sk;Email:seasonx@163.net,谢谢! 本文进通过实例,讲述通过 prototype 自定义方法的过程,旨在抛砖引玉,如果不对的地方,欢迎指正! prototype 是在 IE 4 及其以后版本引入的一个针对于某一类的对象的方法,而且特殊的地方便在于:它是一个给类的对象添加方法的方法!这一点可能听起来会有点乱,别急,下面我便通过实例对这一特殊的方法作已下讲解: 首先,我们要先了解一下类的概念,JavaScript 本身是一种面向对象的语言,它所涉及的元素根据其属性的不同都依附于某一个特定的类。 http://www.blueidea.com/tech/web/2003/1402.asp

蓝色理想 - 用 prototype 定义自己的方法

蓝色理想 - Object对象的一些的隐藏函数介绍

属性:Object.constructor 该属性被定义在类的prototype中,当对象实例创建后通过__proto__链可被对象实例所调用,并指向当前类的构造函数。以此可判断某个对象直接所属的类是哪个(与instanceof不同,instanceof并不局限于对象直接所属的类,即使是父类也返回true)。 [示例] trace(Object.prototype.constructor == Object); //输出 true var a = new Object(); trace(a.constructor == Object); //输出 true var b = new Array(); trace(b.constructor == Array); //输出 true trace(b.constructor == Object); //输出 false trace(b instanceof Object); //输出 true 代码拷贝框 trace(Object.prototype.constructor == Object); //输出 true var a = new Object(); trace(a.constructor == Object); //输出 true var b = new Array(); trace(b.constructor == Array); //输出 true trace(b.constructor == Object); //输出 false trace(b instanceof Object); //输出 true

png website

The PNG web site is organized into four basic categories of information (colored headings below), not counting the separate MNG/JNG site (covering PNG's animated and lossy cousins). There are more than 100 PNG web pages and roughly 30 MNG pages, but with luck this page will help you make sense of it all. Feel free to contact Greg if you have trouble finding something, but please be sure to read the Introduction and FAQ pages first!
//函数名:chksafe //功能介绍:检查是否含有"'",'\\',"/" //参数说明:要检查的字符串 //返回值:0:是 1:不是 function chksafe(a) { return 1; /* fibdn = new Array ("'" ,"\\", "、", ",", ";", "/"); i=fibdn.length; j=a.length; for (ii=0;ii<i;ii++) { for (jj=0;jj<j;jj++) { temp1=a.charAt(jj); temp2=fibdn[ii]; if (temp1==temp2) { return 0; } } } return 1; */ } //函数名:chkspc //功能介绍:检查是否含有空格 //参数说明:要检查的字符串 //返回值:0:是 1:不是 function chkspc(a) { var i=a.length; var j = 0; var k = 0; while (k<i) { if (a.charAt(k) != " ") j = j+1; k = k+1; } if (j==0) { return 0; } if (i!

蓝色理想 - js 几种常用的表单输入判断