jQuery实现图片延迟加载
<script type="text/javascript" src="<?php bloginfo('template_directory');?>/js/jquery.lazyload.js"></script>
<script type="text/javascript">
$(function() {
$("img").lazyload({
effect : "fadeIn"
});
});
</script>
<script type="text/javascript" src="<?php bloginfo('template_directory');?>/js/jquery.lazyload.js"></script>
<script type="text/javascript">
$(function() {
$("img").lazyload({
effect : "fadeIn"
});
});
</script>
演示地址:http://www.souab.com/Demo/demoText.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>逐行文本滚动效果</title>
<style type="text/css">
body,div,ul,li{margin:0;padding:0;}
ul,li{list-style:none;}
body{font-size:12px;color:#000000;}
代码示例:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>可以在两侧移动的代码</title></head>
<body> <div id='dl_left' style='position:absolute; width:93px; height:482px; z-index:1; left: 0px; top: 30px;'><img src='图片地址' width='93' height='482'></div> <div id='dl_right' style='position:absolute; width:93px; height:482px; z-index:1; right: 0px; top: 30px;'><img src='图片地址' width='93' height='482'></div> <script language='javascript'> lastScrollY=0; function heartBeat() { diffY=document.body.scrollTop;
代码示例:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="save" content="history"> <title>saveHistory行为应用</title> </head><body> 用了saveHistory 行为的表单项:<br> <input name="utel" type="text" style="behavior:url(#default#savehistory)"/> <br> 一般表单项:<br> <input name="uname" type="text" /> </body> </html>
注意:<meta name="save" content="history"> 这行代码为必需。
特别说明
saveHistory 默认行为允许对象在浏览器历史中留存数据,相关的特性、事件和方法说明如下:
特性:
XMLDocument 对对象提供的 XML DOM 的引用。
事件:
onload 页面重载时在持久对象上触发。
onsave 在保存、设置 Web 页为标签或离开该页时从持久对象上触发。
方法:
getAttribute 获取指定属性的值。
removeAttribute 从对象移除指定属性。
setAttribute 设置指定属性的值。
演示地址:http://www.souab.com/Demo/201008/CarrefourPic/
支持我的话请点下广告。谢谢。
源文件打包在下面。请通过右键另存为下载。
最新评论
强大!
The purchases I make...
At last! Somonee who...
Good job mkanig it a...
How neat! Is it real...
Unparalleled accurac...
Thanky Thanky for al...
That's an inenguios ...
Holy szhinit, this i...
If you wrote an atri...