Daniel's Knowledge Storage

플래시 창 크기에 맞게 자동 확대 본문

Develop/자바스크립트

플래시 창 크기에 맞게 자동 확대

다니엘SEO 2008. 6. 26. 11:18
창의 크기를 알아내어 embed 태그의 width와 height를 창크기의 변화에 따라 동적으로 변경해 줍니다...
익스에서만 됩니다...


<script language="Javascript">

function printScreenInfo() {
screenInfo.innerHTML = "<embed src=xxx.swf width='" + document.body.clientWidth + "' height='" + document.body.clientHeight + "'>";
}

window.onresize = printScreenInfo;
window.onload = printScreenInfo;
</script>

<body topmargin=0 leftmargin=0 scroll=no>
<div id=screenInfo>
</div>
Comments