<?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>化繁成简... 破茧成蝶 &#187; JavaScript</title>
	<atom:link href="http://www.800l.com/tag/javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://www.800l.com</link>
	<description>From now on, i only care about the person who care about me.</description>
	<lastBuildDate>Mon, 06 Feb 2012 07:10:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>js获取网页的width和height属性</title>
		<link>http://www.800l.com/js-get-page-width-height.html</link>
		<comments>http://www.800l.com/js-get-page-width-height.html#comments</comments>
		<pubDate>Thu, 12 Jan 2012 14:36:36 +0000</pubDate>
		<dc:creator>PRC</dc:creator>
				<category><![CDATA[技术相关]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.800l.com/?p=900</guid>
		<description><![CDATA[网页的width和height属性可以利用下面获得：
查看区别使用下面代码
alert(“网页可见区域宽： document.body.clientWidth：” + document.body.clientWidth + “\n网页可见区域高： document.body.clientHeight：” + document.body.clientHeight + “\n网页可见区域宽： document.body.offsetWidth (包括边线的宽)：” + document.body.offsetWidth + “\n网页可见区域高：  [...]]]></description>
			<content:encoded><![CDATA[<p>网页的width和height属性可以利用下面获得：</p>
<p>查看区别使用下面代码</p>
<blockquote><p>alert(“网页可见区域宽： document.body.clientWidth：” + document.body.clientWidth + “\n网页可见区域高： document.body.clientHeight：” + document.body.clientHeight + “\n网页可见区域宽： document.body.offsetWidth (包括边线的宽)：” + document.body.offsetWidth + “\n网页可见区域高： document.body.offsetHeight (包括边线的高)：” + document.body.offsetHeight + “\n网页正文全文宽： document.body.scrollWidth：” + document.body.scrollWidth + “\n网页正文全文高： document.body.scrollHeight：” + document.body.scrollHeight + “\n网页被卷去的高： document.body.scrollTop：” + document.body.scrollTop + “\n网页被卷去的左： document.body.scrollLeft：” + document.body.scrollLeft + “\n网页正文部分上： window.screenTop：” + window.screenTop + “\n网页正文部分左： window.screenLeft：” + window.screenLeft + “\n屏幕分辨率的高： window.screen.height：” + window.screen.height + “\n屏幕分辨率的宽： window.screen.width：” + window.screen.width + “\n屏幕可用工作区高度： window.screen.availHeight：” + window.screen.availHeight + “\n屏幕可用工作区宽度： window.screen.availWidth：” + window.screen.availWidth);</p></blockquote>
<p><span id="more-900"></span>使用请使用以下代码</p>
<blockquote><p>alert(“网页可见区域宽： document.body.clientWidth：”+document.body.clientWidth);<br />
alert(“网页可见区域高： document.body.clientHeight：”+document.body.clientHeight);<br />
alert(“网页可见区域宽： document.body.offsetWidth (包括边线的宽)：”+document.body.offsetWidth);<br />
alert(“网页可见区域高： document.body.offsetHeight (包括边线的高)：”+document.body.offsetHeight);<br />
alert(“网页正文全文宽： document.body.scrollWidth：”+document.body.scrollWidth);<br />
alert(“网页正文全文高： document.body.scrollHeight：”+document.body.scrollHeight);<br />
alert(“网页被卷去的高： document.body.scrollTop：”+document.body.scrollTop);<br />
alert(“网页被卷去的左： document.body.scrollLeft：”+document.body.scrollLeft);<br />
alert(“网页正文部分上： window.screenTop：”+window.screenTop);<br />
alert(“网页正文部分左： window.screenLeft：”+window.screenLeft);<br />
alert(“屏幕分辨率的高： window.screen.height：”+window.screen.height);<br />
alert(“屏幕分辨率的宽： window.screen.width：”+window.screen.width);<br />
alert(“屏幕可用工作区高度： window.screen.availHeight：”+window.screen.availHeight);<br />
alert(“屏幕可用工作区宽度： window.screen.availWidth：”+window.screen.availWidth);</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.800l.com/js-get-page-width-height.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JS 父窗口加载效果</title>
		<link>http://www.800l.com/js-load-link-in-parent.html</link>
		<comments>http://www.800l.com/js-load-link-in-parent.html#comments</comments>
		<pubDate>Sat, 19 Nov 2011 12:56:57 +0000</pubDate>
		<dc:creator>PRC</dc:creator>
				<category><![CDATA[技术相关]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.800l.com/?p=867</guid>
		<description><![CDATA[实现的效果大致如下，打开1.htm，点击链接新建窗口2.htm，点击2.htm中的链接，新建的窗口关闭并在1.htm窗口重定向。
1.htm代码如下
&#60;html&#62;
&#60;body&#62;
&#60;a href=2.htm onclick=”window.open(&#8217;2.htm&#8217;)”&#62;new&#60;/a&#62;
&#60;/body&#62;
&#60;/html&#62;
2.htm代码如下
&#60;html&#62;
&#60;body&#62;
&#60;a href=#  [...]]]></description>
			<content:encoded><![CDATA[<p>实现的效果大致如下，打开1.htm，点击链接新建窗口2.htm，点击2.htm中的链接，新建的窗口关闭并在1.htm窗口重定向。</p>
<p>1.htm代码如下</p>
<blockquote><p>&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;a href=2.htm onclick=”window.open(&#8217;2.htm&#8217;)”&gt;new&lt;/a&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p><span id="more-867"></span>2.htm代码如下</p>
<blockquote><p>&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;a href=# onclick=”opener.location.href=&#8217;http://baidu.com&#8217;;window.close()”&gt;nbn&lt;/a&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>（完）</p>
]]></content:encoded>
			<wfw:commentRss>http://www.800l.com/js-load-link-in-parent.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JS 定时器(setInterval/setTimeout)使用和失效</title>
		<link>http://www.800l.com/js-setinterval-settimeout.html</link>
		<comments>http://www.800l.com/js-setinterval-settimeout.html#comments</comments>
		<pubDate>Thu, 19 May 2011 23:59:36 +0000</pubDate>
		<dc:creator>PRC</dc:creator>
				<category><![CDATA[技术相关]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.800l.com/?p=757</guid>
		<description><![CDATA[使用问题的话网上太多文章了，这里不赘述了
一直刷
var MyInterval=setInterval(“Refresh()”,1000);
刷一次
setTimeout(“Refresh()”,1000);
相应的都有clear方法来取消定时
这里要着重说的是一个缓存问题，我用jQuery对后台定时请求时遇到IE9的缓存，每次请求都返回一样的结果，用F12看显示状态“304”，而不是“200”，避免缓存问题的话我临时想到的就是往请求URL后面加一个请求时间来避免，实验结果可以避免。
]]></description>
			<content:encoded><![CDATA[<p>使用问题的话网上太多文章了，这里不赘述了</p>
<p>一直刷</p>
<blockquote><p>var MyInterval=setInterval(“Refresh()”,1000);</p></blockquote>
<p><span id="more-757"></span>刷一次</p>
<blockquote><p>setTimeout(“Refresh()”,1000);</p></blockquote>
<p>相应的都有clear方法来取消定时</p>
<p>这里要着重说的是一个缓存问题，我用jQuery对后台定时请求时遇到IE9的缓存，每次请求都返回一样的结果，用F12看显示状态“304”，而不是“200”，避免缓存问题的话我临时想到的就是往请求URL后面加一个请求时间来避免，实验结果可以避免。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.800l.com/js-setinterval-settimeout.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>页面跳转代码—-JavaScript 跳转</title>
		<link>http://www.800l.com/javascript-jump-to-others.html</link>
		<comments>http://www.800l.com/javascript-jump-to-others.html#comments</comments>
		<pubDate>Fri, 29 May 2009 12:07:36 +0000</pubDate>
		<dc:creator>PRC</dc:creator>
				<category><![CDATA[技术相关]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.800l.com/?p=289</guid>
		<description><![CDATA[收着，以备自己不时之需。
&#60;script language="javascript"&#62;
    window.location = "http://www.800l.com";
&#60;/script&#62;
&#60;script language="javascript"&#62;
    document.location = "http://www.800l.com";
&#60;/script&#62;

带进度条的跳转如下
&#60;html&#62;
&#60;head&#62;
&#60;meta http-equiv="Content-Language" content="zh-cn"&#62;
&#60;meta  [...]]]></description>
			<content:encoded><![CDATA[<p>收着，以备自己不时之需。</p>
<p><code>&lt;script language="javascript"&gt;<br />
    window.location = "http://www.800l.com";<br />
&lt;/script&gt;</code></p>
<p><code>&lt;script language="javascript"&gt;<br />
    document.location = "http://www.800l.com";<br />
&lt;/script&gt;<br />
</code><span id="more-289"></span><br />
带进度条的跳转如下<br />
<code>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv="Content-Language" content="zh-cn"&gt;<br />
&lt;meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312"&gt;<br />
&lt;title&gt;跳转到800l.com&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;form name=loading&gt;<br />
&lt;P align=center&gt;&lt;FONT face=Arial color=#0066ff size=2&gt;loading...&lt;/FONT&gt;<br />
&lt;INPUT style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: bolder; PADDING-BOTTOM: 0px; COLOR: #0066ff; BORDER-TOP-style: none; PADDING-TOP: 0px; FONT-FAMILY: Arial; BORDER-RIGHT-style: none; BORDER-LEFT-style: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-style: none"<br />
size=46 name=chart&gt;<br />
&lt;BR&gt;<br />
&lt;INPUT style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; COLOR: #0066ff; BORDER-BOTTOM: medium none; TEXT-ALIGN: center" size=47 name=percent&gt;<br />
&lt;script language="javascript"&gt;<br />
var bar=0<br />
var line="||"<br />
var amount="||"<br />
count()<br />
function count(){<br />
    bar=bar+2<br />
    amount =amount + line<br />
    document.loading.chart.value=amount<br />
    document.loading.percent.value=bar+"%"<br />
    if (bar&lt;99){<br />
        setTimeout("count()",100);<br />
    }else{<br />
        window.location = "http://www.800l.com";<br />
    }<br />
}<br />
&lt;/script&gt;<br />
&lt;/P&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.800l.com/javascript-jump-to-others.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

