body width, height [cross browsing]
Language/JAVASCRIPT 2011. 8. 9. 11:41
getBodyWidth: function () {
var IEWidth = document.body.clientWidth;
var FFWidth = document.documentElement.clientHeight;
var bodyWidth = FFWidth>IEWidth?FFWidth:IEWidth;
return bodyWidth;
},
getBodyHeight: function () {
var IEHeight = document.body.clientHeight;
var FFHeight = document.documentElement.clientHeight;
var bodyHeight = FFHeight>IEHeight?FFHeight:IEHeight;
return bodyHeight;
}
'Language > JAVASCRIPT' 카테고리의 다른 글
setTimeout (0) | 2011.08.31 |
---|---|
javascript sleep (0) | 2011.08.31 |
dynamic javaScript insertion (0) | 2011.08.09 |
자바스크립트 맵, javaScript Map (0) | 2011.08.09 |
클래스명으로 엘리멘트 얻기, getElementsByClassName() (0) | 2011.08.09 |