码迷,mamicode.com
首页 > Web开发 > 详细

用js控制overflow="hidden"

时间:2016-09-30 00:37:51      阅读:262      评论:0      收藏:0      [点我收藏+]

标签:

<html>
<head>
<style type="text/css">
div
{
border:thin solid green;
width:100px;
height:100px;
}
</style>
<script type="text/javascript">
function hideOverflow()
{
document.getElementById("div1").style.overflow="hidden";
}
</script>
</head>
<body>

<div id="div1">
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
</div>
<br />
<input type="button" onclick="hideOverflow()" value="Hide overflow" />

</body>
</html>

用js控制overflow="hidden"

标签:

原文地址:http://www.cnblogs.com/synqqt/p/5921144.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!