Carpe Programming/javascript
[javascript ]세로 스크롤 제거
nolite
2011. 11. 23. 16:16
[ iframe ]
/* ********************************************************
* 세로 스크롤제거
******************************************************** */
function fn_remove_scroll() {
var doc = document.getElementById("frameContents").contentWindow.document;
var height = doc.body.scrollHeight + 50;
document.getElementById("frameContents").style.height = height;
}
[ textarea ]
/* ********************************************************
* 세로 스크롤제거
******************************************************** */
jQuery('document').ready(function(){
var doc = document.getElementById("newsCn");
alert(doc);
var height = doc.scrollHeight + 50;
alert(height);
document.getElementById("newsCn").style.height = height + 20;
});
728x90