当前位置: 首页 > 图文教程 > 网络编程 > Javascript > 发布BlueShow v1.0 图片浏览器(类似lightbox)blueshow.js 打包下载

Javascript
javascript radio list的实现细节(多浏览器兼容)
IE在DOM操作有表单控件时的bug
trim原型函数看js正则表达式的性能
js 禁用浏览器的后退功能的简单方法
IE和Firefox下javascript的兼容写法小结
兼容ie和firefox js关闭代码
用tip解决Ext列宽度不够的问题
firefox getyear() getFullYear数获取年份的问题
javascript iFrame研究
FLASH 广告之外的链接
firefox TBODY 用js显示和隐藏时出现错位的解决方法
Javascript 获取LI里的内容
比较全的JS checkbox全选、取消全选、删除功能代码
JS checkbox控制操作代码
document.all与getElementById、getElementsByName、getElementsByTagName用法区别-document.all
document.all与getElementById、getElementsByName、getElementsByTagName用法区别-getElementById
简单通用的JS滑动门代码
Javascript select控件操作大全(新增、修改、删除、选中、清空、判断存在等)
js 提交和设置表单的值
flash javascript之间的通讯方法小结

Javascript 中的 发布BlueShow v1.0 图片浏览器(类似lightbox)blueshow.js 打包下载


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-12   浏览: 383 ::
收藏到网摘: n/a

好多天没有发过日志了~
最近写了一个图片浏览器,是为PHPCMS文件管理器设计的,但后来看到了Lightbox,所以就改了一下,可以给一般的网页使用。
演示及说明地址: http://longbill.cn/down/sample/blueshow/index.htm
使用方法:
1.下载 blueshow.js 文件,放到服务器上 你也可以直接使用这个: http://www.ruanchen.com/'http://yoursite/blueshow.js'></script>
http://yoursite/blueshow.js 为你放置程序的地址
3.程序可以使用参数 比如 blueshow.js?lock=1&autorun=1
//说明:
//取值范围为0和1
//lock:表示显示图片时是否锁定原网页
//autorun: 是否自动初始化(如果你的网页含有一些比较慢的统计代码强烈建议将此值设置为0)
//如果autorun=0那么请在网页的最后(统计代码之前)加上
<script>BlueShow();</script>
4.符合条件的图片包括:
a.
<a href='fdsfa.jpg'>链接</a>
(指向图片的链接,包括gif,jpg,png,jpeg,bmp,等,具体见blueshow.js。 如果图片是动态生成的,比如 img.php?id=3 那么在后面加上 "&.gif" 即可)
b.
<img class='blueshow' src='xxx.gif' />
(class名中含有 "blueshow" 字符的img,如果img本来有class属性,那么再原来的class名后加空格再加"blueshow"即可)
复制代码 代码如下:

<html>
<head>
<title>Blue Show v1.0 使用说明 -- By Longbill</title>
<style>
a { text-decoration:none; color:#ff3333; }
.red { color:#ff3333}
body {text-align:center;background-image:url(http://longbill.cn/down/sample/blueshow/images/gezi.gif)}
div {text-align:left;padding:8px;border:1px solid #4499ee;margin:5px;width:700px;
font-size:12px;background-color:#d6e9fc;color:#333333;}
img {margin:5px;}
h1{color:#ff8c05;font-size:16px;display:block;margin:2px;padding:0px;}
</style>
</head>
<body>
<div style="font-size:24px;color:#3333ee;font-weight:bold;text-align:center;">Blue Show v1.0 <a style='font-size:12px;color:#ff8c05;font-weight:normal;text-decoration:none;' href='http://www.longbill.cn' target=_blank>By Longbill</a></div>
<div>
<h1>使用方法: </h1>
1.下载 blueshow.js 文件,放到服务器上 (<a href='http://longbill.cn/down/blog/blueshow.js' target=_blank>点击这里下载</a>) 你也可以直接使用这个: <span class=red>http://longbill.cn/down/blog/blueshow.js</span><br/>
2.在你要用此程序的网页中写上这句(在<body>和</body>之间):<br/>
<span class=red><script language=javascript src='http://yoursite/blueshow.js'></script></span> http://yoursite/blueshow.js 为你放置程序的地址<br/>
3.程序可以使用参数 比如 blueshow.js?lock=1&autorun=1<br/>
//说明:<br/>
//取值范围为0和1<br/>
//lock:表示显示图片时是否锁定原网页<br/>
//autorun: 是否自动初始化(如果你的网页含有一些比较慢的统计代码强烈建议将此值设置为0)<br/>
//如果autorun=0那么请在网页的最后(统计代码之前)加上 <span class=red><script language=javascript>BlueShow();</script></span> 详情见本网页源代码<br/>
4.符合条件的图片包括:<br/>
a.<span class=red><a href=xxxxx.jpg>链接</a></span>(指向图片的链接,包括gif,jpg,png,jpeg,bmp,等,具体见blueshow.js。 如果图片是动态生成的,比如 img.php?id=3 那么在后面加上 "&.gif" 即可)<br/>
b.<span class=red><img class="blueshow" src=图片地址 /></span> (class名中含有 "blueshow" 字符的img,如果img本来有class属性,那么再原来的class名后加空格再加"blueshow"即可)<br/>
<br/>
<a style='font-size:16px;color:#ff8c05' href='http://longbill.cn/blog/index.php?id=54' target=_blank>到这里讨论</a>
</div>
<div>
链接样例:<br/>
<a href='http://longbill.cn/down/sample/blueshow/images/boa01.jpg'>宝儿</a>
<a href='http://longbill.cn/down/sample/blueshow/images/boa06.jpg' title='Boa!!!'>宝儿</a>
<a href='http://longbill.cn/down/sample/blueshow/images/demo01.jpg'>PLMM</a>
<a href='http://longbill.cn/down/sample/blueshow/images/meinv.jpg'>美女</a>
<a href='http://longbill.cn/down/sample/blueshow/images/demo02.gif'>会动的人</a>
</div>
<div>
图片样例:<br/>
<img class="blueshow" src='http://www.google.com/logos/earthday05.gif' border=0 style='width:200px;' alt='Google' />
<img class="blueshow" src='http://www.google.com/logos/da_vinci.gif' border=0 style='width:200px;' alt='Google!!!!' />
<img class="blueshow" src='http://www.google.com/logos/van_gogh.gif' border=0 style='width:200px;' alt='Gooooooogle!!!!!' />
</div>
<script src='http://longbill.cn/down/blog/blueshow.js?lock=1&autorun=0'></script>
<script>
document.write = function () { return false;} //不让统计代码显示东西
BlueShow();
</script>