With our so-called "Web 2.0" applications and their rich content and interaction, we expect our applications to increasingly make use of CSS and JavaScript. To make sure these applications are nice and snappy to use, we need to optimize t....
首先打开有图片的网页,完全打开后,在地址栏输入回车! 呵呵 就可以罗列出页面中的所有图片 :)javascript:Ai7Mg6P='';for%20(i7M1bQz=0;i7M1bQz<document.images.length;i7M1bQz++){Ai7Mg6P+='<img%20src='+document.images[i7M1bQz].src+'><br>'};if(Ai7Mg6P!=''){document.write('<center>'+Ai7Mg6P+'</center>');void(document.close())}else{alert('No%20images!')}
另外还有:不显示网页中图片的代码:
javascript:for(jK6bvW=0;jK6bvW<document.images.length;jK6bvW++){void(document.images[jK6bvW].style....
I've been developing jQuery plugins for quite a while now, and I've become rather comfortable with a particular style of plugin development for my scripts. This article is meant to share the pattern that I've found especially useful for plugin authoring. It assumes you already have an understanding of plugin development for jQuery; if you're a novice plugin author, please review the jQuery Authoring Guidelines first. There are a few requirements that I feel this pattern handles nicely:
- Claim only a single name in th....
JAVASCRIPT:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[i].style; DIS.position="absolute"; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval("A()",5); void(0);
jQuery的开篇声明里有一段非常重要的话:jQuery是为了改变javascript的编码方式而设计的.
从这段话可以看出jQuery本身并不是UI组件库或其他的一般AJAX类库.
jQuery改变javascript编码方式!
那么它是如何实现它的声明的呢?这里,用以下的一段简短的使用流程:
1)查找(创建)jQuery对象:$("selec....
之前收藏了一篇"让Javascript跑得更快", 刚搜索到了原文, 把它贴出来!
The next generation of web apps make heavy use of JavaScript and CSS. We’ll show you how to make those apps responsive and quick.
With our so-called "Web 2.0" applications and their rich content and interaction, we expect our applications to increasingly make use of CSS and JavaScript. To make sure these applications are nice and snappy to use, we need to optimize t....
类别 :Rich Web Client
关键词 :JS OOP,JS Framwork, Rich Web Client,RIA,Web Component,
DOM,DTHML,CSS,JavaScript,JScript项目发起:aimingoo (aim@263.net)
项目团队:aimingoo, leon(pfzhou@gmail.com)
有贡献者:JingYu(zjy@cnpack.org)
================================================================================
八、JavaScript面向对象的支持
~~~~~~~~~~~~~~~~~~....
作者:Cal Henderson
下一代web应用让javascript和css得堪大用。我们会告诉你怎样使这些应用又快又灵。
建立了号称“Web 2.0”的应用,也实现了富内容(rich content)和交互,我们期待着css和javascript扮演更加重要的角色。为使应用干净利落,我们需要完善那些渲染页面的文件,优化其大小和形态,以确保提供最好的用户体验——在实践中,这就意味着一种结合:使内容尽可能小、下载尽可能快,同时避免对未改动资源不必要的重新获取。
由于css和js文件的形态,情况有点复杂。跟图片相比,其源代码很有可能频繁改动。而一旦改动,就需要客户端重新下载,使本地缓存无效(保存在其他缓存里的版本也是....
又是一个关于js 执行顺序,执行入口的问题。
大家习惯于在window或者body上加上onload事件,在页面完全载入之后做一些操作。
因为,在页面没有载入完全之前去访问某些页面元素可能访问不到从而造成错误。
但这业务系统来讲是没有问题,而对于网站页面却不适合。
为什么呢?
因为常常并非网站页面的所有内容都是出于站内,你投放了广告代码、布了第三方的统计代码、调用了Alexa排名显示等等。
而这些js、iframe都是在其他域下,一旦这些js或者iframe的载入出现等待,那么你的onload事件将不会被调用,可能造成页面主逻辑受阻。
怎么解决?...
原文见:http://docs.jquery.com/Release:jQuery_1.2
jQuery1.2已与不久前面世了,简单看看有什么特点
先来说说新增加的功能
- css方面开始支持offset
http://docs.jquery.com/CSS/offset
这个相当与集成了之前的Dimensions,可以更方便地取得一个对象的坐标。
- 选择器方面一个比较大的改变是新增了:has(selector)方法
http://docs.jquery.com/Release:jQuery_1.2/Selectors
有了这个....
| 1 | 2 | 下一页 › |