http://www.csdn.net/expert/topic/848/848715.xml?temp=.4786493横向滚动没有,自己加上吧。
解决方案 »
- Ext高手来看看 ext-all.js缺少对象,我用的是Ext2.3
- js 使用<!-- //--> 括起来有何作用
- 获取select的value浏览器兼容性问题!求教!
- 动态 正则表达式
- 遍历tree节点.谢谢大家
- 如何删除div内所有隐藏元素?jquery怎么写?
- 原题已结贴,为了感谢wsj兄弟对已结贴问题的关注,特赠200.
- javaweb jsp显示pdf文件,ie显示导致pdf显示最上层
- frameset嵌套frame页面在移动端无法滚动(上拉回弹,看不到视口的内容)
- 用pdf.js写了一个html导出pdf的功能,在ios手机上不提示下载,而是直接打开,在ios手机上用替他浏览器也不行,求大神赐教。
- 如何打开选择颜色的对话框?有自带函数吗?
- 有关对象复制的问题?
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title><style type="text/css">.button {
background: ButtonFace;
border: 1px solid ButtonShadow;
border-left: 0;
border-right: 0;
}.scrollButton {
font-family: Webdings;
color: blue;
text-align: center;
cursor: hand;
}#scrollContainer {
height: 100%;
overflow: hidden;
padding: 0px;
}.border {
border-left: 1px solid ButtonShadow;
border-right: 1px solid ButtonShadow;
width: 200px;
}
</style>
</head>
<script language="javascript">
/*
功能:滚动*/
function ScrollButton( oEl, oScrollContainer, nDir ) {
this.htmlElement = oEl;
this.scrollContainer = oScrollContainer;
this.dir = nDir;
var oThis = this;
oEl.onmouseover=function(){oThis.startScroll()} //捕作事件
oEl.onmouseout=function(){oThis.endScroll()}}ScrollButton.scrollIntervalPause = 100;
ScrollButton.scrollAmount = 18;ScrollButton.prototype.startScroll = function () {
var oThis = this;
this._interval = window.setInterval( function () {
switch ( oThis.dir ) {
case 8:
oThis.scrollContainer.scrollTop -= ScrollButton.scrollAmount;
break;
case 2:
oThis.scrollContainer.scrollTop += ScrollButton.scrollAmount;
break;
case 4:
oThis.scrollContainer.scrollLeft -= ScrollButton.scrollAmount;
break;
case 6:
oThis.scrollContainer.scrollLeft += ScrollButton.scrollAmount;
break;
}
}, ScrollButton.scrollIntervalPause );
};ScrollButton.prototype.endScroll = function () {
if ( this._interval != null ) {
window.clearInterval( this._interval ); //结束滚动
this._interval=null;
}
};</script><body id="bdy" topmargin="0" leftmargin="0" scroll="no" onselectstart="javascript:return false" ondragstart="javascript:return false" oncontextmenu="javascript:return false">
<center>
<table align="center" width="100%" height="100%" border=0><tr><td align="center" rowspan=2><div id="scrollContainer">
在这个层里添加你的内容!其他的地方不动!<br><br><Br>
在这个层里添加你的内容!其他的地方不动!<br><br><Br>
在这个层里添加你的内容!其他的地方不动!<br><br><Br>
在这个层里添加你的内容!其他的地方不动!<br><br><Br>
在这个层里添加你的内容!其他的地方不动!<br><br><Br>
在这个层里添加你的内容!其他的地方不动!<br><br><Br>
在这个层里添加你的内容!其他的地方不动!<br><br><Br>
在这个层里添加你的内容!其他的地方不动!<br><br><Br>
在这个层里添加你的内容!其他的地方不动!<br><br><Br>
</div> </td>
<td width=16 valign="top">
<div class="scrollButton" id="upScrollButton">5</div>
</td>
</tr>
<tr><td width=16 valign="bottom">
<div class="scrollButton" id="downScrollButton">6</div>
</td></tr>
</table><script type="text/javascript">ScrollButton.scrollIntervalPause = 50; //
ScrollButton.scrollAmount = 5;var upScrollButton = document.getElementById( "upScrollButton" );
var downScrollButton = document.getElementById( "downScrollButton" );
var scrollContainer = document.getElementById( "scrollContainer" );
//var bodyObj=document.getElementById( "body" );new ScrollButton( upScrollButton, scrollContainer, 8 );
new ScrollButton( downScrollButton, scrollContainer, 2 );</script>
</body>
</html>
<!--
.opacity {FILTER: alpha(opacity=100)}
-->
</style>
<script>
function movstar(a,time){
movx=setInterval("mov("+a+")",time)
}
function movover(){
clearInterval(movx)
}
function mov(a){
scrollx=new_date.document.body.scrollLeft
scrolly=new_date.document.body.scrollTop
scrolly=scrolly+a
new_date.window.scroll(scrollx,scrolly)
}
function o_down(theobject){
object=theobject
while(object.filters.alpha.opacity>60){
object.filters.alpha.opacity+=-10}
}
function o_up(theobject){
object=theobject
while(object.filters.alpha.opacity<100){
object.filters.alpha.opacity+=10}
}
function wback(){
if(new_date.history.length==0){window.history.back()}
else{new_date.history.back()}
}
</script>
<img src="images/up.gif" width=19 height=27 class="opacity" onMouseDown=movover();movstar(-3,2) onMouseOut=movover();o_up(this) onMouseOver=movstar(-1,20);o_down(this)onMouseUp=movover();movstar(-1,20) alt="点住不放可以快速向上滚动">
<img src="images/down.gif" width=19 height=19 class="opacity" onMouseDown=movover();movstar(3,2) onMouseOut=movover();o_up(this) onMouseOver=movstar(1,20);o_down(this) onMouseUp=movover();movstar(1,20) alt="点住不放可以快速向下滚动">
<iframe border=0 frameborder=0 framespacing=0 height=120 marginheight=0 marginwidth=0 name=new_date noResize scrolling=no src="iframe.htm" width=200 vspale="0"></iframe>
function movX(a){
scrollx=biao.document.body.scrollLeft;
scrolly=biao.document.body.scrollTop;
scrollx=scrollx+a;
biao.window.scroll(scrollx,scrolly);
}
function movstarX(a,time){
movY=setInterval("movX("+a+")",10);
}
function movstar(a,time){ ]
movx=setInterval("mov("+a+")",10);
}
function movover(){
clearInterval(movx);
}
function movoverY(){
clearInterval(movY);
}
function mov(a){
scrollx=biao.document.body.scrollLeft;
scrolly=biao.document.body.scrollTop;
scrolly=scrolly+a;
biao.window.scroll(scrollx,scrolly);
}
</script>
<A class=opacity href="javascript:void(0)"
onmousedown=movover();movstar(-9,2)
onmouseover=movstar(-2,20) onmouseout=movover()
onmouseup=movover();movstar(-1,20)>up</A> //向下滚动<A class=opacity href="javascript:void(0)"
onmousedown=movover();movstar(9,2)
onmouseover=movstar(2,20) onmouseout=movover()
onmouseup=movover();movstar(1,20)>down</A> //向下滚动
<a class=opacity href="javascript:void(0)"
onmouseout=movoverY() onmouseover=movstarX(2,20)
onmousedown=movoverY();movstarX(5,2)
onmouseup=movoverY();movstarX(1,20) >
left</a> //向左滚动
<a class=opacity href="javascript:void(0)"
onmouseout=movoverY() onmouseover=movstarX(-2,20)
onmousedown=movoverY();movstarX(-5,2)
onmouseup=movoverY();movstarX(-1,20)> //向右滚动