与这个同理
left.htm
left<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><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br>
<script language="javascript">
function doScroll()
{
/* parent.frames["right"].document.body.scrollTop = document.body.scrollTop;
//此为两帧同长度滚动
*/
parent.frames["right"].document.body.scrollTop = (document.body.scrollTop*parent.frames["right"].document.body.scrollHeight)/document.body.scrollHeight;
//此为两帧同速度滚动,但左右帧不能同时调用此函数,否则溢出错
}window.onscroll = doScroll;
</script>right.htm
right<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><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br>
<script language="javascript">
function doScroll()
{
/* parent.frames["left"].document.body.scrollTop = document.body.scrollTop;
//此为两帧同长度滚动
*/
parent.frames["left"].document.body.scrollTop = (document.body.scrollTop*parent.frames["left"].document.body.scrollHeight)/document.body.scrollHeight;
//此为两帧同速度滚动,但左右帧不能同时调用此函数,否则溢出错
}window.onscroll = doScroll;
</script>main.htm
<frameset name=framesetname cols="300,*">
<frame name="left" src="left.htm">
<frame name="right" src="right.htm">
</frameset>
left.htm
left<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><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br>
<script language="javascript">
function doScroll()
{
/* parent.frames["right"].document.body.scrollTop = document.body.scrollTop;
//此为两帧同长度滚动
*/
parent.frames["right"].document.body.scrollTop = (document.body.scrollTop*parent.frames["right"].document.body.scrollHeight)/document.body.scrollHeight;
//此为两帧同速度滚动,但左右帧不能同时调用此函数,否则溢出错
}window.onscroll = doScroll;
</script>right.htm
right<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><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br>
<script language="javascript">
function doScroll()
{
/* parent.frames["left"].document.body.scrollTop = document.body.scrollTop;
//此为两帧同长度滚动
*/
parent.frames["left"].document.body.scrollTop = (document.body.scrollTop*parent.frames["left"].document.body.scrollHeight)/document.body.scrollHeight;
//此为两帧同速度滚动,但左右帧不能同时调用此函数,否则溢出错
}window.onscroll = doScroll;
</script>main.htm
<frameset name=framesetname cols="300,*">
<frame name="left" src="left.htm">
<frame name="right" src="right.htm">
</frameset>
top<p>tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
<script language="javascript">
function doScroll()
{
parent.frames["mybottom"].document.body.scrollWidth = document.body.scrollWidth;
//此为两帧同长度滚动// parent.frames["mybottom"].document.body.scrollWidth = (document.body.scrollWidth*parent.frames["mybottom"].document.body.scrollWidth)/document.body.scrollWidth;
//此为两帧同速度滚动,但两帧不能同时调用此函数,否则溢出错
}
window.onscroll = doScroll;
</script>bottom.htm
bottom<p>bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
<script language="javascript">
function doScroll()
{
parent.frames["mytop"].document.body.scrollWidth = document.body.scrollWidth;
//此为两帧同长度滚动// parent.frames["mytop"].document.body.scrollWidth = (document.body.scrollWidth*parent.frames["mytop"].document.body.scrollWidth)/document.body.scrollWidth;
//此为两帧同速度滚动,但两帧不能同时调用此函数,否则溢出错
}
window.onscroll = doScroll;
</script>main.htm
<frameset name=framesetname rows="300,*">
<frame name="mytop" src="top.htm">
<frame name="mybottom" src="bottom.htm">
</frameset>
<frame name="mytop" src="top.htm">
<frame name="mybottom" src="bottom.htm">
</frameset>mytop.document.body.onscroll = Function("mytop.document.body.scrollLeft = mybottom.document.body.scrollLeft");好象是这么写的吧
修改如下
top.htm
top
<p>ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
<script language="javascript">
function doScroll()
{
parent.frames["mybottom"].document.body.scrollLeft = document.body.scrollLeft;/* parent.frames["mybottom"].document.body.scrollLeft = (document.body.scrollLeft*parent.frames["mybottom"].document.body.scrollWidth)/document.body.scrollWidth;
*/
}
window.onscroll = doScroll;
</script>bottom.htm
bottom
<p>bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
<script language="javascript">
function doScroll()
{
parent.frames["mytop"].document.body.scrollLeft = document.body.scrollLeft;
//此为两帧同长度滚动/* parent.frames["mytop"].document.body.scrollLeft = (document.body.scrollLeft*parent.frames["mytop"].document.body.scrollWidth)/document.body.scrollWidth;
//此为两帧同速度滚动,但两帧不能同时调用此函数,否则溢出错
*/
}
window.onscroll = doScroll;
</script>
人做任何事情,都有背后的动机或者某种激励。所谓有果必有因。刚刚看了《人人都能成功》说共有10种:
1.自我保护的愿望
2.爱的情绪
3.恐惧的情绪
4.性的情绪
5.死后生活的愿望
6.谋求身心自由的愿望
7.愤怒的情绪
8.憎恨的情绪
9.谋求认识和自我表现的愿望
10.获取物质财富的愿望假设上述翻译过来的没有错误的话,似乎动机是第二个和第九个。你有着关心和照顾革命同志的爱心,想来CSDN一定有你喜欢的事物或人;同时,你也希望自己的才华展现出来被人发现,被人欣赏。这个解释你觉得如何?另外有几句话要说:你的确很优秀,我很欣赏你:)
:)