-
jCalendar.js 日期选择插件
香水坏坏 发表于2010-3-5 [Javascript] -
这哥们关于js的变量域讨论不错
香水坏坏 发表于2009-8-21 [Javascript] -
FCK Editor 表单提交时运行的代码
香水坏坏 发表于2009-6-10 [Javascript]for( var name in FCKeditorAPI.Instances){
var oEditor=FCKeditorAPI.Instances[name];
if( oEditor.GetParentForm && oEditor.GetParentForm()==this )
oEditor.UpdateLinkedField();
} -
javascript强制弹出新窗口 防拦截
香水坏坏 发表于2009-4-30 [Javascript]朋友问到,就顺便写了这段脚本...
JavaScript代码- <script type="text/javascript">
- function openNewWin(url){
- var dom = document.createElement('a');
- dom.setAttribute('href',url);
- dom.setAttribute('target','_blank');
- document.body.appendChild(dom);
- dom.click();
- document.body.removeChild(dom);
- }
- </script>
- <input type="button" onclick="openNewWin('http://www.aspstat.com/');"/>
-
SWFObject说明文档
香水坏坏 发表于2009-2-24 [Javascript]主要内容:
- 1 . 什么是SWFObject 2.0?
- 2 . 为什么你应该使用SWFObject 2.0?
- 3 . 为什么SWFObject 2.0使用JavaScript?
- 4 . 我们应该使用静态发表还是动态发表的方法?
- 5 . 怎样用SWFObject 2.0的静态发表方法来嵌入Flash内容
- 6 . 怎样用SWFObject 2.0的动态发表方法来嵌入Flash内容?
- 7 . 从SWFObject 1.5迁移到SWFObject 2.0的注意事项
- 8 . 从UFO迁移到SWFObject v2.0的注意事项
- 9 . SWFObject支持MIME类型application/xhtml+xml吗?
- 10 . 评论政策
-
javascript cookie script
香水坏坏 发表于2009-2-10 [Javascript]<SCRIPT LANGUAGE="JavaScript">
<!--/*
(More...)
name - name of the cookie
value - value of the cookie
[expires] - expiration date of the cookie
(defaults to end of current session)
[path] - path for which the cookie is valid
(defaults to path of calling document)
[domain] - domain for which the cookie is valid
(defaults to domain of calling document)
[secure] - Boolean value indicating if the cookie transmission requires
a secure transmission
* an argument defaults when it is assigned null as a placeholder
* a null placeholder is not required for trailing omitted arguments
*/ -
Javascript在FF下读取XML
香水坏坏 发表于2009-1-15 [Javascript]Once you've learned about basic XML viewing and styling in the Firefox browser, the next capability you're likely to care about is scripting. In this article, I show the basics of how you can manipulate XML with JavaScript code. I include code examples and screenshots, all of which I created and tested using Firefox 1.5.0.4 on Ubuntu Linux® with a fresh profile (that is, with no extensions and with the default options as installed). If you want to write cross-browser code for XML processing, you might have to use additional browser-sniffing techniques, but I don't cover those in this article.
(More...) -
通过前端优化提升你的网站速度
香水坏坏 发表于2008-8-29 [Javascript]参考自:http://developer.yahoo.com/performance/
减少HTTP请求数量
包括:图片,样式,脚本,flash等等。
方法:
组合文件:把所有的script放到一个脚本文件,css也放到一个样式表。
使用CSS片段:把所有的背景图片做到一个文件里,通过background-image,backgroun-position来显示这些片段。
(More...) -
防止发生默认浏览器行为
香水坏坏 发表于2008-8-28 [Javascript]function stopDefault(e){
if( e&&e.preventDefault) e.preventDefault();
else window.event.returnValue = false;
return false;
} -
javascript开发中要注意的事情
香水坏坏 发表于2008-8-27 [Javascript]js中的引用:
实在的对象绝对不是引用;引用是指向某个对象地址的指针(这和其他语言是一样的)
例:
var a="do";
var b=a; //这里是传值,生成新的string对象
b+="ing"; //同样生成新的string对象
alert( b==a) //false
(More...)

