<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ROOTLAU.COM &#187; iframe</title>
	<atom:link href="http://blog.rootlau.com/wp/tag/iframe/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rootlau.com/wp</link>
	<description>Root Lau Offical Blog</description>
	<lastBuildDate>Sat, 29 Nov 2014 05:45:31 +0000</lastBuildDate>
	<language>zh-TW</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>Adjust width height of iframe to fit with content in it</title>
		<link>http://blog.rootlau.com/wp/adjust-width-height-of-iframe-to-fit-with-content-in-it/</link>
		<comments>http://blog.rootlau.com/wp/adjust-width-height-of-iframe-to-fit-with-content-in-it/#comments</comments>
		<pubDate>Sat, 27 Oct 2012 03:14:31 +0000</pubDate>
		<dc:creator><![CDATA[rootlau]]></dc:creator>
				<category><![CDATA[網頁設計]]></category>
		<category><![CDATA[iframe]]></category>

		<guid isPermaLink="false">http://blog.rootlau.com/wp/?p=227</guid>
		<description><![CDATA[&#60;script language=&#8221;JavaScript&#8221;&#62; &#60;!&#8211; function autoResize(id){ var newheight; var newwidth; if(document.getElementById){ newheight=document.getElementById(id).contentWindow.document .body.scrollHeight; newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth; } document.getElementById(id).height= (newheight) + &#8220;px&#8221;; document.getElementById(id).width= (newwidth) + &#8220;px&#8221;; } //&#8211;&#62; &#60;/script&#62; &#60;IFRAME SRC=&#8221;usagelogs/default.aspx&#8221; width=&#8221;100%&#8221; height=&#8221;200px&#8221; id=&#8221;iframe1&#8243; marginheight=&#8221;0&#8243; frameborder=&#8221;0&#8243; onLoad=&#8221;autoResize(&#8216;iframe1&#8242;);&#8221;&#62;&#60;/iframe&#62; &#160;]]></description>
				<content:encoded><![CDATA[<p>&lt;script language=&#8221;JavaScript&#8221;&gt;<br />
&lt;!&#8211;<br />
function autoResize(id){<br />
var newheight;<br />
var newwidth;</p>
<p>if(document.getElementById){<br />
newheight=document.getElementById(id).contentWindow.document .body.scrollHeight;<br />
newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth;<br />
}</p>
<p>document.getElementById(id).height= (newheight) + &#8220;px&#8221;;<br />
document.getElementById(id).width= (newwidth) + &#8220;px&#8221;;<br />
}<br />
//&#8211;&gt;<br />
&lt;/script&gt;</p>
<p>&lt;IFRAME SRC=&#8221;usagelogs/default.aspx&#8221; width=&#8221;100%&#8221; height=&#8221;200px&#8221; id=&#8221;iframe1&#8243; marginheight=&#8221;0&#8243; frameborder=&#8221;0&#8243; onLoad=&#8221;autoResize(&#8216;iframe1&#8242;);&#8221;&gt;&lt;/iframe&gt;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootlau.com/wp/adjust-width-height-of-iframe-to-fit-with-content-in-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
