getHtmlInfo
function getHtmlInfo()
{
var obj = {
clientHeight : 0,
clientWidth : 0,
scrollHeight : 0,
scrollWidth : 0,
scrollLeft : 0,
scrollTop : 0,
offsetHeight : 0,
offsetWidth : 0 ,
screenX:0,
screenY:0
};
if (document.documentElement){
obj.clientHeight = parseInt(document.documentElement.clientHeight);
obj.clientWidth = parseInt(document.documentElement.clientWidth);
obj.scrollHeight = parseInt(document.documentElement.scrollHeight);
obj.scrollWidth = parseInt(document.documentElement.scrollWidth);
if(navigator.userAgent.indexOf("Chrome") != -1) {
obj.scrollLeft = parseInt(document.body.scrollLeft);
obj.scrollTop = parseInt(document.body.scrollTop);
} else {
obj.scrollLeft = parseInt(document.documentElement.scrollLeft);
obj.scrollTop = parseInt(document.documentElement.scrollTop);
}
if(navigator.appName=="Netscape"){
if(navigator.userAgent.indexOf("Chrome") != -1) {
obj.offsetHeight = parseInt(document.body.scrollTop);
obj.offsetWidth = parseInt(document.body.scrollLeft);
} else {
obj.offsetHeight = parseInt(document.documentElement.clientHeight);
obj.offsetWidth = parseInt(document.documentElement.clientWidth);
}
}
if(navigator.appName.indexOf("Microsoft") != -1) {
obj.offsetHeight = parseInt(document.documentElement.offsetHeight);
obj.offsetWidth = parseInt(document.documentElement.offsetWidth);
}
//if(document.body.offsetHeight) obj.offsetHeight = parseInt(document.documentElement.offsetHeight);
//else obj.offsetHeight = parseInt(document.documentElement.clientHeight);
//if(document.body.offsetWidth) obj.offsetWidth = parseInt(document.documentElement.offsetWidth);
//else obj.offsetWidth = parseInt(document.documentElement.clientWidth);
obj.screenX = parseInt(screen.width);
//alert(screen.height);
obj.screenY = parseInt(screen.height);
//alert("HEIGHT : " + document.documentElement.clientHeight);
} else if (document.body){
obj.clientHeight = parseInt(document.body.clientHeight);
obj.clientWidth = parseInt(document.body.clientWidth);
obj.scrollHeight = parseInt(document.body.scrollHeight);
obj.scrollWidth = parseInt(document.body.scrollWidth);
obj.scrollLeft = parseInt(document.body.scrollLeft);
obj.scrollTop = parseInt(document.body.scrollTop);
obj.offsetHeight = parseInt(document.body.offsetHeight);
obj.offsetWidth = parseInt(document.body.offsetWidth);
obj.screenX = parseInt(screen.width);
obj.screenY = parseInt(screen.height);
}else{
//[Netscape stuff]
}
return obj;
}
게시판 목록
개발자팁
개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.
질문은 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 5276 | 2년 전 | 1335 | |||
| 5275 | 2년 전 | 1403 | |||
| 5274 | 기타 | 2년 전 | 820 | ||
| 5273 | JavaScript |
swallow
|
2년 전 | 1051 | |
| 5272 | node.js |
swallow
|
2년 전 | 748 | |
| 5271 | JavaScript |
swallow
|
2년 전 | 1498 | |
| 5270 | PHP |
swallow
|
2년 전 | 847 | |
| 5269 | node.js |
swallow
|
2년 전 | 683 | |
| 5268 | node.js |
swallow
|
2년 전 | 1215 | |
| 5267 | PHP |
swallow
|
2년 전 | 1598 | |
| 5266 | MySQL |
swallow
|
2년 전 | 1095 | |
| 5265 | PHP |
swallow
|
2년 전 | 2035 | |
| 5264 | JavaScript |
swallow
|
2년 전 | 861 | |
| 5263 | 기타 |
swallow
|
2년 전 | 2984 | |
| 5262 | 기타 |
swallow
|
2년 전 | 670 | |
| 5261 | node.js |
swallow
|
2년 전 | 1065 | |
| 5260 | JavaScript |
swallow
|
2년 전 | 1513 | |
| 5259 | node.js |
swallow
|
2년 전 | 735 | |
| 5258 | node.js |
swallow
|
2년 전 | 1749 | |
| 5257 | node.js |
swallow
|
2년 전 | 1299 | |
| 5256 | PHP |
swallow
|
2년 전 | 1941 | |
| 5255 | node.js |
swallow
|
2년 전 | 690 | |
| 5254 | PHP |
swallow
|
2년 전 | 3014 | |
| 5253 | node.js |
swallow
|
2년 전 | 679 | |
| 5252 | 정규표현식 |
swallow
|
2년 전 | 625 | |
| 5251 | node.js |
swallow
|
2년 전 | 881 | |
| 5250 | PHP |
swallow
|
2년 전 | 1115 | |
| 5249 | node.js |
swallow
|
2년 전 | 1064 | |
| 5248 | PHP |
swallow
|
2년 전 | 1411 | |
| 5247 | node.js |
swallow
|
2년 전 | 1018 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기