![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Javascript/JQquery
Hone
这个作者很懒,什么都没留下…
展开
-
Javascript: DOMContentLoaded事件
继基于Mozilla的浏览器之后,Opera9也支持了DOMContentLoaded事件。DOMContentLoaded事件与window对象的load事件是相对的。两者的不同在于:window.onload,那必须等到网页上的二进制内容都加载完毕才会执行,而其实在它们载入之前,这个Page中的DOM早已载入完毕,可以调用了。使用方法如下:document.addEventListen原创 2009-02-21 15:56:00 · 1675 阅读 · 0 评论 -
SPINNING WHEEL ON WEBKIT FOR IPHONE/IPOD TOUCH
转自:http://cubiq.org/spinning-wheel-on-webkit-for-iphone-ipod-touchHOW TO USE THE SCRIPTThe widget is composed of two parts: the stylesheet a转载 2011-07-20 11:03:44 · 345 阅读 · 0 评论 -
高性能WEB开发 - 图片篇
一、缩小图片大小 当图片很多的时候,减少图片大小是提高下载速度最直接的方法。1. 使用PNG8代替GIF(非动画图片),因为PNG8在效果一样的情况,图片大小比GIF要小。 2. 用fireworks处理PNG图片,在我们产品中很多PNG图片是美工直接用photoshop导出的,转载 2011-07-19 17:00:32 · 74 阅读 · 0 评论 -
妙用204状态
http中200,404,500状态大家都很清楚,但204状态大家可能用的比较少,204状态是指服务器成功处理了客户端请求,但服务器无返回内容。204是HTTP中数据量最少的响应状态,204的响应中没有body,而且Content-Length=0。很多人在使用ajax提交一些数转载 2011-07-19 17:02:27 · 201 阅读 · 0 评论 -
SPINNING WHEEL ON WEBKIT FOR IPHONE/IPOD TOUCH
文章转自:http://cubiq.org/spinning-wheel-on-webkit-for-iphone-ipod-touchHOW TO USE THE SCRIPTThe widget is composed of two parts: the stylesheet转载 2011-07-20 10:43:42 · 87 阅读 · 0 评论 -
javascript delete operator
博客迁移:http://idoican.net.cn/post/10424705038/javascript-delete-operator转载 2009-08-26 12:37:00 · 143 阅读 · 0 评论 -
event.charCode, event.keycode和event.which
博客迁移:http://strictstyle.net/blog/show/1/event.charCode,%20event.keycode%E5%92%8Cevent.which.html原创 2009-02-21 13:59:00 · 1166 阅读 · 2 评论 -
IE activate event
<br />相对于一般浏览器的focus和blur事件,IE有它独特的事件,激发顺序如下:<br /> <br />beforeactivate/beforedeactivate -> activate/deactivate -> focusin/focusout -> focus/blur原创 2011-04-01 15:23:00 · 98 阅读 · 0 评论 -
JavaScript对input的内容做样式后:form reset 造成的bug
用JavaScript实现了databoxinput的value是unix时间戳,通过JavaScript,将该时间戳显示为:****-**-** **:** PM但是form reset后,丑陋的时间戳有回到了input里面。分析:主要是input的defaultValue造成的解决:修改input的value值时,同步修改input的defaultValue值原创 2011-02-25 10:20:00 · 421 阅读 · 0 评论 -
Javascript: XMLHttpRequest对象
本文介绍Request对象所具有的属性。这些属性在大多数浏览器中已经获得了支持。包括IE5.0以及后续版本、Safari1.3和2.0、Netscape7和Opera较高级版本(如:Opera8.5)。Mozilla Firefox的Request对象还具有更多的属性和方法, 对象的属性 onreadystatechange:回调函数,只要readyState发生变化,被赋原创 2009-02-21 16:13:00 · 541 阅读 · 0 评论 -
Javascript: DOM2高级事件处理
除了Internet Explorer以外,所有的现代浏览器都支持2级DOM的事件模型.事件的传播:在0级DOM事件模型中,浏览器把时间分派给发生事件的文档元素。如果那个对象具有适合的事件句柄,就运行这个句柄。除此之外不执行其他操作。在2级DOM事件模型中,当事件发生在文档元素上时,目标的事件句柄就被触发。此外,目标的每个祖先元素也有机会处理那个事件。事件传播分为三个阶段进原创 2009-02-25 21:55:00 · 726 阅读 · 0 评论 -
Javascript: DOM2的事件类型列表
2级DOM的Event模块包括HTMLEvents模块,MouseEvents模块,UIEvents模块。HTMLEvents模块提供对Event类型事件的支持:abort,blur,change,erro,focus,load,reset,resize,scroll,select,submit,unloadMouseEvents模块提供对MouseEvent类型事件的支持:click原创 2009-02-26 22:34:00 · 1146 阅读 · 0 评论 -
Error: this.form.submit is not a function
How’s web development coming along? Good?Oh well here’s a small tip in case you are having a form that you are submitting using this.form.submit() from JavaScriptDon’t ever ever think about having转载 2009-05-13 11:17:00 · 1589 阅读 · 1 评论 -
What determines that a script is long-running?
Internet Explorer determines that a script is long-running by the total amount of statements the JScript engine has executed. By default, the value is 5 million statements and can be altered v转载 2009-05-23 17:21:00 · 188 阅读 · 0 评论 -
Javascript: IE定義的、不兼容標準的EVENT模型
有些內容老忘記,就寫下來。IE不支持標標準的DOM事件模型。在標準事件模型中,Event對象傳遞給事件句柄函數。在IE中事件模型中,它被存儲在Window對象的event屬性中。在標準的事件模型中,Event的各種子接口定義了額外的屬性,它們提供了和特定事件模型相關的細節。在IE事件模型中,只定義了一種類型的Event對象,它用於所有類型的事件。boolean altKey:原创 2009-05-22 21:36:00 · 246 阅读 · 0 评论 -
10 Practical Uses For AJAX
Login Forms: Instead of going to a login page, and then navigating back to the page you originally wanted, with AJAX, a user can type in their user name and password directly into the original p转载 2009-06-14 20:19:00 · 227 阅读 · 0 评论 -
javascript的变量作用域问题
变量的作用域实函数级的<!-- var a=1000; function testA(){ a = 2000; (function(){ alert(a); var a = 3000; })(); } function testB(){原创 2010-03-22 14:31:00 · 93 阅读 · 0 评论