当前位置: 首页 > 图文教程 > 网络编程 > Javascript > 一个JS翻页效果

Javascript
[IE&FireFox兼容]JS对select操作
JS实现全景图效果360度旋转
Unicode 编码转换器
如何用javascript判断录入的日期是否合法
图片从右至左滚动JS
JS控件autocomplete 0.11演示及下载 1月5日已更新
一个对于js this关键字的问题
Javascript标准DOM Range操作全集
兼容Mozilla必须知道的知识。
你所要知道JS(DHTML)中的一些技巧
JS效率个人经验谈(8-15更新),加入range技巧
如何让动态插入的javascript脚本代码跑起来。
Javascript调试工具(下载)
脚本中出现 window.open() access is denied - 拒绝访问 情况一则及分析
Javascript-Mozilla和IE中的一个函数直接量的问题
贴一个在Mozilla中常用的Javascript代码
Javascript miscellanea -display data real time, using window.status
js技巧--转义符"\"的妙用
In Javascript Class, how to call the prototype method.(three method)
Javascript与vbscript数据共享

Javascript 中的 一个JS翻页效果


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

<IFRAME border=0 align=center marginWidth=0 marginHeight=0 src="1.htm" frameBorder=no width=200 scrolling=no height=200 style="border: 1px solid #CCCCCC" id="pic"></IFRAME>
<a href="javascript:Page(-1)">上一页</a><a href="javascript:Page(1)">下一页</a>
<script language="javascript">
var curId = 1;
var maxId = 3;
if (document.location.search) curId = Number(document.location.search.split("?")[1].split("=")[1]);
document.getElementById("pic").src = curId + ".htm";
function Page(id)
{
if ( id == 0 )
curId = Number(document.getElementById("page").value);
else
curId += id;
if ( curId < 1 )
curId = 1;
if ( curId > maxId )
curId = maxId;
document.getElementById("pic").src = curId + ".htm";
}
</script>
跳转到第
<input id="page" type="text" size="5">

<input type="button" name="Submit" value="GO" onClick="Page(0)">
以上是我对于一个翻页效果的修改,不知道可不可以,大家帮看看
不知道有没有什么实际意义