부모레이어 길이에 따라 출력되는 자식레이어? 정보
부모레이어 길이에 따라 출력되는 자식레이어?본문
부모레이어 길이에 따라서,
예를들어 부모레이어 높이가 1000이상일때만 나타나는 자식레이어..? 일정크기 이하일땐 자식레리어가 안나타나게..하는정도, 스크립트로 어떻게 하면돼나요?
예를들어 부모레이어 높이가 1000이상일때만 나타나는 자식레이어..? 일정크기 이하일땐 자식레리어가 안나타나게..하는정도, 스크립트로 어떻게 하면돼나요?
댓글 전체
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script>
window.onload = function() {
var div = document.getElementById("a").scrollHeight;
var div_div = document.getElementById("b");
if(div>=1000){
div_div.style.display="block";
}
}
</script>
<style type="text/css">
#a{height:1000px;}
#b{display:none;}
</style>
</head>
<body>
<div id="a">
<div id="b">
12345
</div>
</div>
</body>
</html>
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script>
window.onload = function() {
var div = document.getElementById("a").scrollHeight;
var div_div = document.getElementById("b");
if(div>=1000){
div_div.style.display="block";
}
}
</script>
<style type="text/css">
#a{height:1000px;}
#b{display:none;}
</style>
</head>
<body>
<div id="a">
<div id="b">
12345
</div>
</div>
</body>
</html>