 |
|
|  |
[HTML5]¿¡¼ frameset ´ëü ¹æ¹ý°ú iframe ¼Ó¼º |
|
|
 |
2³â Àü |
# framset ´ëó ¹æ¹ý
<script type="text/javascript">
<!--
var webUrl = "http://www.naver.com";
var mobileUrl = "http://m.naver.com";
window.onload = function()
{
window.document.body.ownerDocument.clear();
var ifrmFlag = document.getElementById('ifrm');
if(ifrmFlag != null && ifrmFlag != "null" && ifrmFlag != "")
{
document.body.removeChild(ifrmFlag);
}
var iframe = document.createElement("iframe");
iframe.id = "ifrm";
iframe.src = webUrl;
iframe.width = "100%";
iframe.height = "100%";
iframe.frameBorder = "0";
iframe.scrolling = "no";
document.body.appendChild(iframe);
};
//-->
</script>
<body topmargin="0" leftmargin="0">
</body>
# iframe ¼Ó¼º °ü·Ã
seamless: °ªÀº¾ø´Ù À̼ӼºÀ» »ç¿ëÇÏ¸é ¹®¼¿¡ ±×³ÉÀϹÝÄÜÅÙÃ÷·Î³ªÅ¸³´Ù.
¿¹Á¦)
<iframe seamless src="form.html" width="300" height="200"></iframe>
sandbox: º¸¾È°È¸¦ À§ÇØ Ãß°¡µÈ°ÍÀÌ´Ù. °ªÀº 4°¡Áö°¡ÀÖ´Ù.
¿¹Á¦)
<iframe sandbox="allow-same-origin"></iframe>
<iframe sandbox="allow-top-navigation"></iframe>
<iframe sandbox="allow-forms"></iframe>
<iframe sandbox="allow-scripts"></iframe>
»ç¶óÁø ±â´Éµé
<iframe align="" frameborder="" longdesc="" marginheight="" marginwidth="" scrolling=""></iframe>
alignÀº img¿¤¸®¸ÕÆ®¿¡¼ ¼³¸íÇßµíÀÌ css·Î ´ëü, ¸¶Áø º¸´õ¿ª½Ã ¸¶Âù°¡Áö´Ù.
¿¾ºÎÅÍ ³íÀǵǴø scroll¹Ù¿ª½Ã overflow·Î css·Î ´ëüµÈ´Ù.
¼³¸íÇØÁÖ´ø ¿¤¸®¸ÕÆ® longdesc´Â a¿¤¸®¸ÕÆ®·Î ´ëüµÇ¾ú´Ù.
<iframe src="inner.html" width="300" height="200"></iframe>
°¡·Î ¼¼·Î ¸µÅ©ÇÒ ÆÄÀÏÀ» º¸¿©ÁØ¿¹ÀÌ´Ù.
²À src°¡ ¾Æ´Ï´õ¶óµµ ÄÜÅÙÆ®¿¡ Æ÷ÇÔ½Ãų·Á¸é srcdoc¸¦ »ç¿ëÇϸéµÈ´Ù.
ÇÏÁö¸¸ Áö¿øµÇ´Â ºê¶ó¿ìÀú°¡ ¾ø´Ù.
<iframe srcdoc="<p>¸ðµçºÎ¶ó¿ìÀú¿¡¼ Áö¿ø¾ÈÇÔ</p>" width="300" height="200"></iframe>
|
|
̵̧ : 169 |
̵̧
¸ñ·Ï
|
|
|  |
|