http://yw.zxxk.com/softList.aspx?ClassID=614&ChapterID=408&NodeID=1584
这个页面上的内容简介JS
根据DIV的高度自动判断超过180PX自动overflow:hidden 并且超过180PX的DIV 鼠标划过滚动条出现
这个页面上的内容简介JS
根据DIV的高度自动判断超过180PX自动overflow:hidden 并且超过180PX的DIV 鼠标划过滚动条出现
解决方案 »
- 求一个正则表达式的解释
- 在prototype中定义函数的问题
- 在TD中动态添加INPUT后无法获得该INPUT的值??
- 文本框得到焦点后改变文本框颜色
- ewebeditor初始状态如何设置?
- js在可编辑DIV内的光标处插入图片或者表情,谁能解决我跪了!
- 有关javascript access is denied的问题
- 计算中英文字符串的长度
- EXTJS PagingToolbar 这个传输到后台是start limit 然后后台进行计算。
- 求助!添加数据到数据库为什么一直产生执行数据库异常跳转到出错页面
- 求JavaScript的帮助文档,中文的.祥细点的,谢谢
- webForm treeview 节点拖拽到一个可编辑的div中,希望大家给点思路
或者看看这个,下面的评论比较有用
<script type="text/javascript">
$(function() {
var div1 = $("#div1");
div1.hover(function() {
if (parseInt(div1.css("height")) >= 100) {
var _this = $(this);
_this.css("height", 100).css("overflowY", "scroll");
}
}, function() {
var _this = $(this);
_this.css("height", 100).css("overflowY", "hidden");
});
});
</script>用jq写了下。不知道是不是要这样的效果
<%for (int i = 0; i < 100; i++) {
%>
<li><%=i.ToString() %></li>
<%
} %>
</ul>
</div>function pageLoad()
{
var div1=document.getElementById("div1");
div1.onmousemove=function(){
if(parseInt(div1.style.height)>=100)
{
div1.style.height="100px";
div1.style.overflowY="scroll";
}
}
div1.onmouseout=function(){
div1.style.height="100px";
div1.style.overflowY="hidden";
}
}#7的是用JQ做的
$("div.item_intro").each(
function(){if(this.offsetHeight>180){
this.style.height="180px";this.style.overflow="hidden"}});
$("div.item_intro").mouseover(
function(){$(this).css("overflow","auto")});
$("div.item_intro").mouseout(function(){$(this).css("overflow","hidden")})}
<script type="text/javascript">
var div1=document.getElementById("div1");
if(parseInt(div1.offsetHeight)>=100)
{
div1.style.height="100px";
div1.onmouseover=function(){
div1.style.overflow="auto";
}
div1.onmouseout=function(){
div1.style.overflow="hidden";
}
}
</script>