移动div <div id=oDiv1 onscroll=os()><div id=oDiv2>...function os(){ oDiv2.scrollTop = event.srcElement.scrollTop;} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>TEXT TO HTML </title></head><body bgcolor="#FFFFFF" style="background:url('joo.gif') center no-repeat fixed;"><table height="100%*" width="100%*" valign="middle"> <tr valign="middle"> <td> <table width="100%*" height="100%*" border="0" align="left" valign="middle"> <tr> <td width="50%*"> <textarea name="content" style="width:100%;height:95%;"> d d d d e e e e e e e e e e e e e e e12331233 </textarea> </td> <td width="50%"> <div id="panel" style="border:inset 1px;width:100%;height:95%;overflow:scroll;"></div> </td> </tr> </table> </td> </tr></table></body><script language="JavaScript">contentFocused = true;panelFocused = false;content.onfocus = function() { contentFocused = true; }content.onblur = function() { contentFocused = false; }panel.onfocus = function() { panelFocused = true; }panel.onblur = function() { panelFocused = false; }content.onscroll = function() { if (contentFocused) { panel.scrollTop = content.scrollTop * (panel.scrollHeight - panel.clientHeight) / (content.scrollHeight - content.clientHeight); } }panel.onscroll = function() { if (panelFocused) { content.scrollTop = panel.scrollTop * (content.scrollHeight - content.clientHeight) / (panel.scrollHeight - panel.clientHeight); } }panel.innerHTML = "<pre>" + content.value + "</pre>";</script></html> <HTML><HEAD> <TITLE>Chaser by Aaron Boodman</TITLE><STYLE TYPE='text/css'> #myChaser { position:absolute; left:200px; top:0px; width:250px; color:#555555; font-family:verdana, arial, sans-serif; font-size:12px; }</STYLE></HEAD><BODY><DIV ID='myChaser'>位置相对固定的层,可以任意设置。<br></DIV><SCRIPT LANGUAGE='JavaScript'>var oChaser = { topMargin : 25, callRate : 10, slideTime : 1200, maxDiff : document.all ? document.body.clientHeight : window.innerHeight, isIE : document.all ? true : false, chaserDiv : document[document.all ? "all" : "layers"]["myChaser"]}window.setInterval("oChaser.main( )", oChaser.callRate)oChaser.main = function( ){ this.currentY = this.isIE ? this.chaserDiv.style.pixelTop : this.chaserDiv.top //pixelTop:该对象的top属性值,与top数值一样,但它是整型,不是字符型的值 this.scrollTop = this.isIE ? document.body.scrollTop : window.pageYOffset //scrollTop:顶部滚动过的距离 var newTargetY = this.scrollTop + this.topMargin if ( this.currentY != newTargetY ) { if ( newTargetY != this.targetY ) { this.targetY = newTargetY this.slideInit( ) } this.slide( ) }}oChaser.slideInit = function( ){ var now = new Date( ) this.A = this.targetY - this.currentY this.B = Math.PI / ( 2 * this.slideTime ) this.C = now.getTime( ) if (Math.abs(this.A) > this.maxDiff) { this.D = this.A > 0 ? this.targetY - this.maxDiff : this.targetY + this.maxDiff this.A = this.A > 0 ? this.maxDiff : -this.maxDiff } else { this.D = this.currentY }}oChaser.slide = function( ){ var now = new Date( ) var newY = this.A * Math.sin( this.B * ( now.getTime( ) - this.C ) ) + this.D newY = Math.round( newY ) if (( this.A > 0 && newY > this.currentY ) || ( this.A < 0 && newY < this.currentY )) { if ( this.isIE )this.chaserDiv.style.pixelTop = newY else this.chaserDiv.top = newY }}</SCRIPT><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><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><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR></BODY></HTML> 如何使ie支持canvas的fillText <object>怎么接受onclick事件 如何解决IE7因 position:relative;引起的递归导致页面鼠标频繁闪动? Java触发器的问题 input不能改变值 不失去焦点 请问51job城市选择的JS怎么用? 请问如何通过JS 获取IE客户端缓存文件? 怎么让span里的文字不能被选中。。 谁能提供一个在Webform上模拟Winform上的Toolbar的代码或示例。 孟兄:值传递的问题? 紧急:使用javascript如何让打开的窗口只有垂直滚动条而没有水平滚动条? 如何控制IE对frameset中的各个frame的载入顺序?
<title>
TEXT TO HTML
</title>
</head>
<body bgcolor="#FFFFFF" style="background:url('joo.gif') center no-repeat fixed;">
<table height="100%*" width="100%*" valign="middle">
<tr valign="middle">
<td>
<table width="100%*" height="100%*" border="0" align="left" valign="middle">
<tr>
<td width="50%*">
<textarea name="content" style="width:100%;height:95%;">
d
d
d
d
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
1
2
33
1
2
33
</textarea>
</td>
<td width="50%">
<div id="panel" style="border:inset 1px;width:100%;height:95%;overflow:scroll;"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
<script language="JavaScript">
contentFocused = true;
panelFocused = false;
content.onfocus = function() {
contentFocused = true;
}
content.onblur = function() {
contentFocused = false;
}
panel.onfocus = function() {
panelFocused = true;
}
panel.onblur = function() {
panelFocused = false;
}
content.onscroll = function() {
if (contentFocused) {
panel.scrollTop = content.scrollTop * (panel.scrollHeight - panel.clientHeight) / (content.scrollHeight - content.clientHeight);
}
}
panel.onscroll = function() {
if (panelFocused) {
content.scrollTop = panel.scrollTop * (content.scrollHeight - content.clientHeight) / (panel.scrollHeight - panel.clientHeight);
}
}
panel.innerHTML = "<pre>" + content.value + "</pre>";
</script>
</html>
<HEAD>
<TITLE>Chaser by Aaron Boodman</TITLE><STYLE TYPE='text/css'>
#myChaser {
position:absolute;
left:200px;
top:0px;
width:250px;
color:#555555;
font-family:verdana, arial, sans-serif;
font-size:12px;
}
</STYLE></HEAD><BODY>
<DIV ID='myChaser'>
位置相对固定的层,可以任意设置。<br>
</DIV>
<SCRIPT LANGUAGE='JavaScript'>
var oChaser = {
topMargin : 25,
callRate : 10,
slideTime : 1200,
maxDiff : document.all ? document.body.clientHeight : window.innerHeight,
isIE : document.all ? true : false,
chaserDiv : document[document.all ? "all" : "layers"]["myChaser"]
}window.setInterval("oChaser.main( )", oChaser.callRate)
oChaser.main = function( )
{
this.currentY = this.isIE ? this.chaserDiv.style.pixelTop : this.chaserDiv.top //pixelTop:该对象的top属性值,与top数值一样,但它是整型,不是字符型的值
this.scrollTop = this.isIE ? document.body.scrollTop : window.pageYOffset //scrollTop:顶部滚动过的距离
var newTargetY = this.scrollTop + this.topMargin if ( this.currentY != newTargetY ) { if ( newTargetY != this.targetY ) { this.targetY = newTargetY
this.slideInit( )
} this.slide( )
}
}
oChaser.slideInit = function( )
{
var now = new Date( )
this.A = this.targetY - this.currentY
this.B = Math.PI / ( 2 * this.slideTime )
this.C = now.getTime( ) if (Math.abs(this.A) > this.maxDiff) {
this.D = this.A > 0 ? this.targetY - this.maxDiff : this.targetY + this.maxDiff
this.A = this.A > 0 ? this.maxDiff : -this.maxDiff
} else {
this.D = this.currentY
}
}oChaser.slide = function( )
{
var now = new Date( )
var newY = this.A * Math.sin( this.B * ( now.getTime( ) - this.C ) ) + this.D
newY = Math.round( newY ) if (( this.A > 0 && newY > this.currentY ) ||
( this.A < 0 && newY < this.currentY )) {
if ( this.isIE )this.chaserDiv.style.pixelTop = newY
else this.chaserDiv.top = newY
}
}
</SCRIPT>
<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><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><BR><BR><BR><BR><BR><BR>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
</BODY>
</HTML>