当前位置: 首页 > 图文教程 > 网络编程 > Javascript > TFDN图片播放器 不错自动播放

Javascript
给初学者提供几本学习js值得看的书
Javascript----文件操作
Vml+Js算法:完成5个小球在网页运动(碰壁返回)的游戏,详细注释
Vml+Dhtml:制作一个应用渐变颜色效果不错的进度条
Dhtml+Js算法:5个小球运动的简化版,变通实现更简单的飞行的图片
Vml+Dhtml:小小的页面效果,叫它"淘气鬼"好了
判断客户浏览器是否支持cookie
几种常用的表单输入判断
CSDN无限级树数据库版(ASP+ACCESS)
JavaScript 寫遊戲 : 俄羅斯方塊
JavaScript 寫遊戲 : 搬吖
JavaScript 遊戲 : 貪吃蛇
JavaScript 寫時鍾日曆
VML:经典的图片叠加效果(灰色调)
一个简单的仿xp的js下拉菜单
JScript 寫 sortNode
关于javascript中数组元素删除问题的讨论
IE中非模式对话框(showModelessDialog)应用
Dhtml:用ondrag事件简单的实现鼠标拖动物件.
对WebUI技术感兴趣的说

Javascript 中的 TFDN图片播放器 不错自动播放


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

复制代码 代码如下:

<html>
<head>
<title>52515.net上传程序</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body,td,th {
font-size: 14px;
color: #FFFFFF;
}
INPUT {
BORDER-TOP-WIDTH: 1px; BORDER-LEFT-WIDTH: 1px; FONT-SIZE: 12px; BORDER-BOTTOM-WIDTH: 1px; BORDER-RIGHT-WIDTH: 1px
}
.style1 {
font-size: 36px;
font-family: "隶书";
}
body {
background-color: #000000;
}
a:link {
color: #FFFFFF;
text-decoration: none;
}
a:visited {
color: #FFFFFF;
text-decoration: none;
}
a:hover {
color: #FFFFFF;
text-decoration: none;
}
a:active {
color: #FFFFFF;
text-decoration: none;
}
.style2 {font-size: 18px}
-->
</style>
<SCRIPT language=JavaScript>
<!-- Begin
//more javascript from http://www.smallrain.net
var rotate_delay = 3000; // delay in milliseconds (1000 = 1 secs)
current = 0;
function next() {
if (document.slideform.slide[current+1]) {
if(document.all){
document.images.show.style.filter="blendTrans(duration=2)"
document.images.show.style.filter="blendTrans(duration=crossFadeDuration)"
document.images.show.filters.blendTrans.Apply()
}
document.images.show.src = document.slideform.slide[current+1].value;
if(document.all){
document.images.show.filters.blendTrans.play()
}
document.slideform.slide.selectedIndex = ++current;
}
else first();
}
function previous() {
if (current-1 >= 0) {
if(document.all){
document.images.show.style.filter="blendTrans(duration=2)"
document.images.show.style.filter="blendTrans(duration=crossFadeDuration)"
document.images.show.filters.blendTrans.Apply()
}
document.images.show.src = document.slideform.slide[current-1].value;
if(document.all){
document.images.show.filters.blendTrans.play()
}
document.slideform.slide.selectedIndex = --current;
}
else last();
}
function first() {
current = 0;
if(document.all){
document.images.show.style.filter="blendTrans(duration=2)"
document.images.show.style.filter="blendTrans(duration=crossFadeDuration)"
document.images.show.filters.blendTrans.Apply()
}
document.images.show.src = document.slideform.slide[0].value;
if(document.all){
document.images.show.filters.blendTrans.play()
}
document.slideform.slide.selectedIndex = 0;
}
function last() {
current = document.slideform.slide.length-1;
if(document.all){
document.images.show.style.filter="blendTrans(duration=2)"
document.images.show.style.filter="blendTrans(duration=crossFadeDuration)"
document.images.show.filters.blendTrans.Apply()
}
document.images.show.src = document.slideform.slide[current].value;
if(document.all){
document.images.show.filters.blendTrans.play()
}
document.slideform.slide.selectedIndex = current;
}
function ap(text) {
document.slideform.slidebutton.value = (text == "停止播放") ? "自动播放" : "停止播放";
rotate();
}
function change() {
current = document.slideform.slide.selectedIndex;
if(document.all){
document.images.show.style.filter="blendTrans(duration=2)"
document.images.show.style.filter="blendTrans(duration=crossFadeDuration)"
document.images.show.filters.blendTrans.Apply()
}
document.images.show.src = document.slideform.slide[current].value;
if(document.all){
document.images.show.filters.blendTrans.play()
}
}
function rotate() {
if (document.slideform.slidebutton.value == "停止播放") {
current = (current == document.slideform.slide.length-1) ? 0 : current+1;
if(document.all){
document.images.show.style.filter="blendTrans(duration=2)"
document.images.show.style.filter="blendTrans(duration=crossFadeDuration)"
document.images.show.filters.blendTrans.Apply()
}
document.images.show.src = document.slideform.slide[current].value;
if(document.all){
document.images.show.filters.blendTrans.play()
}
document.slideform.slide.selectedIndex = current;
window.setTimeout("rotate()", rotate_delay);
}
}
// End -->
</SCRIPT>
</head>
<body>
<FORM name=slideform>
<div align="center" class="style1"> TFDN图片播放器
</div>
<TABLE width="80%" height="243" border=1 align=center cellPadding=0 cellSpacing=0 bordercolor="#009900" bgcolor="#009933" style="border-collapse:collapse">
<TR>
<TD height="220" align="center" vAlign=center ><IMG src="http://61.152.149.36/images/shanghai/office/8gua20050901/1767.jpg" align=center name=show > </TD>
</TR>
</TABLE>

<TABLE width="80%" border=1 align="center" cellPadding=0 cellSpacing=0 bordercolor="#FF9900" style="border-collapse:collapse">
<TR>
<TD height=29 align=middle bgcolor="#FF9900" >
<%
set rs=conn.execute("select * from upload order by id")
%>
<SELECT onchange=change(); name=slide>
<% do while not rs.eof %>
<OPTION value=<%=rs("upfile")%>><%=rs("filename")%></OPTION>
<%
rs.movenext
loop
set rs=nothing
set conn=nothing
%>
</SELECT>
<INPUT title=Beginning onclick=first(); type=button value="首张">
<INPUT title=Previous onclick=previous(); type=button value="上一张">
<INPUT title=AutoPlay onclick=ap(this.value); type=button value=自动播放 name=slidebutton>
<INPUT title=Next onclick=next(); type=button value="下一张">
<INPUT title=End onclick=last(); type=button value="尾张">
<a href="up.htm">[上传图片]</a> <a href="admin.asp">[图片管理]
</a></TD>
</TR>
</TABLE>
</FORM>
</body>
</html>