梦想的起点

my shop:http://fashion-for-you.taobao.com/

导航

随笔分类 -  Ajax技术

JScript实现的一个String.Format方法-转载
摘要:本文转载自作者:鸟食轩//StringHelper.Format('{0},{2},{1}','abc','def','ghi');//return"abc,ghi,def".StringHelper.Format=function(format){if(arguments.length==0){return'';}if(arguments.length==1){returnString(form... 阅读全文

posted @ 2010-06-10 09:37 梦想的起点 阅读(155) 评论(0) 推荐(0)

判断客户端是否装有QQ-来自清凉小屋
摘要:判断客户端是否装有QQfunction IsInstallQQ(){ try{//支持 var xmlhttp=new ActiveXObject("TimwpDll.TimwpCheck");return true;} catch(e){//不支持 location.href='http://is.qq.com/webpresence/up_alarm.shtml'; //window.open... 阅读全文

posted @ 2010-06-02 17:41 梦想的起点 阅读(461) 评论(0) 推荐(0)

在火狐中iframe也能自适应高度
摘要:<script type="text/javascript"> function SetCwinHeight(mainifr){ if (document.getElementById){ if (mainifr && !window.opera){ if (mainifr.contentDocument && mainifr.contentDocume... 阅读全文

posted @ 2010-03-02 08:24 梦想的起点 阅读(427) 评论(0) 推荐(0)

如何优化javascript的执行速度
摘要:这个是我在网上找的资料,具体的出处,我已经记不清楚了,觉得很不错,就和大家分享了1:修改循环的执行方式for(var i=0;i<element.childNodes.length;i++){ 执行代码}这种方式每次循环都要取element.childNodes.length的值,应该改为如下的var n=element.childNodes.lengthfor(var i=0;i<n... 阅读全文

posted @ 2010-01-23 10:16 梦想的起点 阅读(380) 评论(0) 推荐(0)