Clientheight在Chrome中不起作用,我该怎么办?

时间:2014-03-10 08:26:47

标签: javascript dom

我正在尝试在Chrome中解决此问题,因为clientHeight属性在Chrome中不起作用?

function getMiddle (param1,param2) {
    var circle = document.getElementById(param1);
    var div = document.getElementById(param2);
    var clientHeight = div.clientHeight;
    var new_height = Math.round(clientHeight/2)-25;
    circle.style.marginTop =new_height + "px";
    circle.style.visibility="visible";
 }

0 个答案:

没有答案