标题:[求助]幻灯片效果脚本----[本地化]
取消只看楼主
独孤幽灵
Rank: 1
等 级:新手上路
帖 子:115
专家分:0
注 册:2005-11-24
 问题点数:0 回复次数:1 
[求助]幻灯片效果脚本----[本地化]

下面这段代码另存为.html,打开看可以浏览到效果

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 2</title>
</head>

<body>
<script language="JavaScript" type="text/javascript">
var rotate_delay = 1000; // 1000=1秒
current = 0;
function next() {
if (document.slideform.slide[current+1]) {
document.images.show.src = document.slideform.slide[current+1].value;
document.slideform.slide.selectedIndex = ++current;
}
else first();
}
function previous() {
if (current-1 >= 0) {
document.images.show.src = document.slideform.slide[current-1].value;
document.slideform.slide.selectedIndex = --current;
}
else last();
}
function first() {
current = 0;
document.images.show.src = document.slideform.slide[0].value;
document.slideform.slide.selectedIndex = 0;
}
function last() {
current = document.slideform.slide.length-1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
}
function ap(text) {
document.slideform.slidebutton.value = (text == "停止") ? "开始" : "停止";
rotate();
}
function change() {
current = document.slideform.slide.selectedIndex;
document.images.show.src = document.slideform.slide[current].value;
}
function rotate() {
if (document.slideform.slidebutton.value == "停止") {
current = (current == document.slideform.slide.length-1) ? 0 : current+1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
window.setTimeout("rotate()", rotate_delay);
}
}
function window.onload(){
document.images.show.src = document.slideform.slide[current].value;
document.images.show.onclick = owin;
}

function owin(url){
window.open(document.slideform.slide[current].link);
}
</script>
<table align="center" width="90%" bgcolor="#ffffff">
<tr>
<td height="20"></td>
</tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0" align="center" border="0">
<form name="slideform">
<tr>
<td align="middle">
<img src="" border="0" name="show"></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td align="middle">
<select onchange="change();" name="slide">
<option value="http://cn.yimg.com/sp/slideshow/biz/i20050429t110509b0-a.jpg">
图01</option>
<option value="http://cn.yimg.com/sp/slideshow/biz/i20050429t110509b1-a.jpg" >
图02</option>
<option value="http://cn.yimg.com/sp/slideshow/biz/i20050429t110509b2-a.jpg" >
图03</option>
<option value="http://cn.yimg.com/sp/slideshow/biz/i20050429t110509b3-a.jpg" >
图04</option>
<option value="http://cn.yimg.com/sp/slideshow/biz/i20050429t110509b4-a.jpg" >
图05</option>
<option value="http://cn.yimg.com/sp/slideshow/biz/i20050429t110509b5-a.jpg" >
图06</option>
<option value="http://cn.yimg.com/sp/slideshow/biz/i20050429t110509b6-a.jpg" >
图07</option>
<option value="http://cn.yimg.com/sp/slideshow/biz/i20050429t110509b7-a.jpg" >
图08</option>
<option value="http://cn.yimg.com/sp/slideshow/biz/i20050429t110509b8-a.jpg" >
图09</option>
<option value="http://cn.yimg.com/sp/slideshow/biz/i20050429t110509b9-a.jpg" >
图10</option>

</select></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td align="middle">
<input title="第一张" onclick="first();" type="button" value="|&lt;&lt;" name="button">
<input title="上一张" onclick="previous();" type="button" value="&lt;&lt;" name="button">
<input title="自动" onclick="ap(this.value);" type="button" value="开始" name="slidebutton">
<input title="下一张" onclick="next();" type="button" value="&gt;&gt;" name="button">
<input title="最后张" onclick="last();" type="button" value="&gt;&gt;|" name="button">
</td>
</tr>
<tr>
<td> </td>
</tr>
</form>
</tbody>
</table>
</td>
</tr>
</table>
</body>

</html>



我把<table> <script>中的内容放到Default.aspx的源中,然后把<option value="http://cn.yimg.com/sp/slideshow/biz/i20050429t110509b4-a.jpg" >
改成< optionvalue="image/1.gif">




< optionvalue="image/10.gif">
image 文件夹与Default.aspx在同级目录下面
怎么浏览不到效果呢,路径要怎么改啊,
哪位朋友指教下啊

[此贴子已经被作者于2006-9-28 0:42:59编辑过]

搜索更多相关主题的帖子: 脚本 效果 幻灯片 本地化 
2006-09-28 00:41
独孤幽灵
Rank: 1
等 级:新手上路
帖 子:115
专家分:0
注 册:2005-11-24
得分:0 
问题已解决

2006-10-06 11:30



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-93426-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017668 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved