下面的js代码为什么本地测试没问题,上传服务器上就不能显示呢? 10
下面是我的代码,主要是为了是几个div等高,防止内容过长而错位<scripttype="text/javascript">functiongetHeight(){heig...
下面是我的代码,主要是为了是几个div等高,防止内容过长而错位
<script type="text/javascript">
function getHeight() {
height = document.getElementById("cheight").offsetHeight+ "px";
document.getElementById("right_h").style.height = height;
document.getElementById("left_h").style.height = height;
document.getElementById("right_h2").style.height = height;
document.getElementById("right_h3").style.height = height;
}
window.onload = function() {
getHeight();
}
</script> 展开
<script type="text/javascript">
function getHeight() {
height = document.getElementById("cheight").offsetHeight+ "px";
document.getElementById("right_h").style.height = height;
document.getElementById("left_h").style.height = height;
document.getElementById("right_h2").style.height = height;
document.getElementById("right_h3").style.height = height;
}
window.onload = function() {
getHeight();
}
</script> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询