有一个div,高度190px,div的内容超过了本身的高度,我想隐藏前面的内容,显示最后的内容,牛人告诉我该怎么做... 如题,在线等》。速度求 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我就是不想用滚动条,当div的内容高度大于div本身高度时,增加一倍div的高度,但显示的内容应该是190px到380px的内容,而0至190px的内容隐藏,最好是用jquery产生动画滑动效果 <script type='text/javascript' src='jquery-1.4.2.min.js'></script><div id="div1" style="width:100px;height:200px;overflow:hidden;"> <div id="div2" style="width:100px;">文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字文字内容文字内容文字内容文字内容底部底部底部底部底部底部底部底部底部底部底部底部底部</div></div><script>var height=0;var n=10;function scroll(){ height+=n; $("#div1").scrollTop(height); if(height<$("#div2").height()){setTimeout("scroll()",200);} }scroll();</script> javascript Question 一个模态窗口上打开另一个模态窗口 [20 分] 如何让 HTML 下的 TextBox 控件在按下回车时不会提交表单? jquery 获取子元素个数 请高手详细指点。谢谢 我有个问题,关于marquee属性的,大家来帮忙呀,谢谢 还是刷新问题,郁闷啊。 <DIV>的循环显示问题!急!!! 出错:document.frmDefault.divSeat不是一个对象 请问高手怎么使窗体的最大化按纽变灰?意思就是所不能改变窗体的大小... jQuery 中 $(window).scrollTop(); 原生的js怎么写 没学过JS,图片加载弱智问题
<script type='text/javascript' src='jquery-1.4.2.min.js'></script>
<div id="div1" style="width:100px;height:200px;overflow:hidden;">
<div id="div2" style="width:100px;">文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字文字内容文字内容文字内容文字内容底部底部底部底部底部底部底部底部底部底部底部底部底部</div>
</div>
<script>
var height=0;
var n=10;
function scroll()
{
height+=n;
$("#div1").scrollTop(height);
if(height<$("#div2").height()){setTimeout("scroll()",200);}
}
scroll();
</script>