最高半折刷qq各种业务和钻(家里人自己开的,尽管放心,大家多捧捧场)

sking7

导航

2011年12月5日 #

iframe的src的另类

摘要: <body><iframe id="f"></iframe><script language="javascript">var frame_ready=false;document.getElementById('f').src = 'data:text/html,<body onload="parent.frame_ready = true"></body>';window.setTimeout(function(){alert( 阅读全文

posted @ 2011-12-05 23:49 G.N&K 阅读(222) 评论(0) 推荐(0) 编辑

浏览历史嗅探

摘要: 今天看到新闻如下:<Quote>过去几年,为了防止基于 CSS 的浏览历史嗅探,浏览器开发商废弃了 CSS :visited 选择器。现在,安全研究人员公布了新的浏览历史嗅探工具(支持 Firefox、Chrome 和 opera,实验性支持 IE),能通过快速检查缓存提取出浏览历史。这并不是一种新方法,但比以前的实现要方便得多。</Quote>遍进入所发出的网址去看了下源码<html><title>Firefox PoC: rapid history extraction through non-destructive cache timing 阅读全文

posted @ 2011-12-05 23:34 G.N&K 阅读(817) 评论(0) 推荐(0) 编辑

JavaScript跨域总结与解决办法

摘要: (转自http://www.cnblogs.com/rainman/archive/2011/02/20/1959325.html)另外还有一篇文章http://dancewithnet.com/2007/07/22/solve-cross-sub-domain-ajax-with-document-domain/和http://www.36ria.com/3890JavaScript出于安全方面的考虑,不允许跨域调用其他页面的对象。但在安全限制的同时也给注入iframe或是ajax应用上带来了不少麻烦。这里把涉及到跨域的一些问题简单地整理一下:首先什么是跨域,简单地理解就是因为JavaScr 阅读全文

posted @ 2011-12-05 21:28 G.N&K 阅读(205) 评论(0) 推荐(0) 编辑

2011年12月1日 #

关于javascript中的感叹号(!)

摘要: 看到别人写了个代码。。自己就瞎琢磨起来 text:function(value){ var node = this[0]; if(value === void 0){ if(!node){ return "" }else if(node.tagName == "OPTION" || node.tagName === "SCRIPT"){ return node.text... 阅读全文

posted @ 2011-12-01 21:43 G.N&K 阅读(1626) 评论(0) 推荐(0) 编辑

转-Web开发人员常用速查手册

摘要: 不管你是多么优秀的程序员,你都不可能记住一切。在你编写程序的过程中碰到问题需要查阅手册的时候,若有现成的手册可参考则可以为你节省很多时间。为了方便各位朋友,本文收集了一些对Web开发人员非常有用的手册,记得推荐一下哦。HTML 速查手册HTML/XTML in one pageHTML5: The Evolution of Web Standards by James Sugrue(X)HTML Elements and AttributesDoctype Declarations (DTDs)XHTML Character Entity ReferenceGoSquared HTML Hel 阅读全文

posted @ 2011-12-01 00:03 G.N&K 阅读(212) 评论(0) 推荐(0) 编辑

2011年11月30日 #

关于window.window

摘要: 从firefox的firebug可以看出。window里引用了自身的对象。。在MDN中找到了这样做的原因。。-----------------------------------Quote---------------The window property of a window object points to the window object itself. Thus the following expressions all return the same window object:window中window的属性指向的是window对象本身,因此下面的表达式总是返回相同的windo 阅读全文

posted @ 2011-11-30 23:39 G.N&K 阅读(574) 评论(0) 推荐(0) 编辑

(转)为IE的javascript提速

摘要: http://www.cnblogs.com/rubylouvre/archive/2010/02/11/1667628.html(原文)我们知道,javascript在执行期时是由内到外执行脚本的,那么离我们的脚本最远的全局对象,很可能要跨越几层作用域才能访问到它。不过在IE中, 从最内层到最外层要花的时间比其他多出很多。加之,javascript是一种胶水语言,它必须要调用DOM对能完成我们大多数选择。最著名的就是选择元 素(document.getElementById,document.getElementsByTagName,docuemnt.evaluate,document.qu 阅读全文

posted @ 2011-11-30 22:28 G.N&K 阅读(283) 评论(0) 推荐(0) 编辑

2011年11月29日 #

关于getBytes

摘要: String s_iso88591=new String(”中".getBytes("UTF-8"),"ISO-8859-1");//这样得出的字符串,然后传到目的地,再以这样的方式解密:String s_utf8=new String(s_iso88591.getBytes("ISO-8859-1"),"UTF-8");//这样也能得到中文。。有时我们必须要把中文解析为ISO-8859-1的字节方式编码。。例如(http head头就要求其内容必须为ISO-8859-1编码)所以这时候上面的方法就得到了 阅读全文

posted @ 2011-11-29 21:31 G.N&K 阅读(171) 评论(0) 推荐(0) 编辑

2011年11月28日 #

json对象扁平化(转)

摘要: { hotelName:’abc’, hotelAddress:’ 北京海淀路72号’, Rooms:[ {roomName:’标准间’,roomPrice:720}, {roomName:豪华间,roomPrice:1020}], HotelStar:4 } //这时我们必需转换成如下格式才能正确提交到后台Action的对象上。 { hotelName:’abc’, hotelAddress:’ 北京海淀路72号’, Rooms[0]: {roomName:’标准间’,roomPrice:720}, ... 阅读全文

posted @ 2011-11-28 10:09 G.N&K 阅读(1786) 评论(0) 推荐(0) 编辑

自己写的同步加载js文件

摘要: +function(){ ITS={ _add:function(element){ this.sysn.push(element); }, sysn:[],//tong bu _loadNextJs:function(){ var that=this;//* if(that.sysn.length>0){ var head=document.getElementsByTagName("head")[0]; var src=that.sysn.shift(); var script=document.createElement("sc... 阅读全文

posted @ 2011-11-28 09:37 G.N&K 阅读(1684) 评论(0) 推荐(0) 编辑