<?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>71街 &#187; JS</title>
	<atom:link href="http://www.71j.cn/archives/tag/js/feed" rel="self" type="application/rss+xml" />
	<link>http://www.71j.cn</link>
	<description>杜工的技术博客</description>
	<lastBuildDate>Fri, 16 Dec 2011 03:52:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Discuz7.2 IE9兼容性&#8211;杜工完全修补方案</title>
		<link>http://www.71j.cn/archives/257</link>
		<comments>http://www.71j.cn/archives/257#comments</comments>
		<pubDate>Fri, 22 Apr 2011 10:02:23 +0000</pubDate>
		<dc:creator>杜工</dc:creator>
				<category><![CDATA[感悟]]></category>
		<category><![CDATA[discuz]]></category>
		<category><![CDATA[JS]]></category>

		<guid isPermaLink="false">http://www.71j.cn/?p=257</guid>
		<description><![CDATA[现象： 1. IE9快速发帖不跳转 2. IE9管理员处理帖子失败 3. IE9登录不跳转，需要手动刷新 原因： 1. AJAXPOST函数判断out了 2. 动态创建iframe时各浏览器处理方式不同 解决方法： 1. 修改templates/header.ht... ]]></description>
			<content:encoded><![CDATA[<div>现象：<br />
1. IE9快速发帖不跳转<br />
2. IE9管理员处理帖子失败<br />
3. IE9登录不跳转，需要手动刷新</div>
<div>原因：<br />
1. AJAXPOST函数判断out了<br />
2. 动态创建iframe时各浏览器处理方式不同</div>
<div>解决方法：<br />
1. 修改templates/header.htm<br />
把</div>
<div>替换为</div>
<div>2.修改include/js/common.js<br />
把ajaxpost函数替换为：</div>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> ajaxpost<span style="color: #009900;">&#40;</span>formid<span style="color: #339933;">,</span> showid<span style="color: #339933;">,</span> waitid<span style="color: #339933;">,</span> showidclass<span style="color: #339933;">,</span> submitbtn<span style="color: #339933;">,</span> recall<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #003366; font-weight: bold;">var</span> waitid <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">typeof</span> waitid <span style="color: #339933;">==</span> <span style="color: #3366CC;">'undefined'</span> <span style="color: #339933;">||</span> waitid <span style="color: #339933;">===</span> <span style="color: #003366; font-weight: bold;">null</span> <span style="color: #339933;">?</span> showid <span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span>waitid <span style="color: #339933;">!==</span> <span style="color: #3366CC;">''</span> <span style="color: #339933;">?</span> waitid <span style="color: #339933;">:</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> showidclass <span style="color: #339933;">=</span> <span style="color: #339933;">!</span>showidclass <span style="color: #339933;">?</span> <span style="color: #3366CC;">''</span> <span style="color: #339933;">:</span> showidclass<span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> ajaxframeid <span style="color: #339933;">=</span> <span style="color: #3366CC;">'ajaxframe'</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> ajaxframe <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>ajaxframeid<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> formtarget <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>formid<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">target</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> handleResult <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #003366; font-weight: bold;">var</span> s <span style="color: #339933;">=</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> evaled <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
showloading<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'none'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
 s <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>ajaxframeid<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">contentWindow</span>.<span style="color: #660066;">document</span>.<span style="color: #660066;">XMLDocument</span>.<span style="color: #660066;">text</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000066; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
 s <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>ajaxframeid<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">contentWindow</span>.<span style="color: #660066;">document</span>.<span style="color: #660066;">documentElement</span>.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">wholeText</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000066; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
 s <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>ajaxframeid<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">contentWindow</span>.<span style="color: #660066;">document</span>.<span style="color: #660066;">documentElement</span>.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">nodeValue</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 s <span style="color: #339933;">=</span> <span style="color: #3366CC;">'内部错误，无法显示此内容'</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>s <span style="color: #339933;">!=</span> <span style="color: #3366CC;">''</span> <span style="color: #339933;">&amp;&amp;</span> s.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ajaxerror'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 evalscript<span style="color: #009900;">&#40;</span>s<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 evaled <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>showidclass<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 $<span style="color: #009900;">&#40;</span>showid<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">className</span> <span style="color: #339933;">=</span> showidclass<span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>submitbtn<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 submitbtn.<span style="color: #660066;">disabled</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>evaled <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> ajaxerror <span style="color: #339933;">==</span> <span style="color: #3366CC;">'undefined'</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>ajaxerror<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 ajaxinnerhtml<span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span>showid<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> s<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
 ajaxerror <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span>formid<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> $<span style="color: #009900;">&#40;</span>formid<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">target</span> <span style="color: #339933;">=</span> formtarget<span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> recall <span style="color: #339933;">==</span> <span style="color: #3366CC;">'function'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 recall<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000066; font-weight: bold;">eval</span><span style="color: #009900;">&#40;</span>recall<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>evaled<span style="color: #009900;">&#41;</span> evalscript<span style="color: #009900;">&#40;</span>s<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 ajaxframe.<span style="color: #660066;">loading</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'append_parent'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeChild</span><span style="color: #009900;">&#40;</span>ajaxframe<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>ajaxframe<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000066; font-weight: bold;">try</span><span style="color: #009900;">&#123;</span>
 ajaxframe <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;iframe name=&quot;'</span> <span style="color: #339933;">+</span> ajaxframeid <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot; id=&quot;'</span> <span style="color: #339933;">+</span> ajaxframeid <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot;&gt;&lt;/iframe&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
 ajaxframe <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'iframe'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 ajaxframe.<span style="color: #000066;">name</span> <span style="color: #339933;">=</span> ajaxframeid<span style="color: #339933;">;</span>
 ajaxframe.<span style="color: #660066;">id</span> <span style="color: #339933;">=</span> ajaxframeid<span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
 ajaxframe.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'none'</span><span style="color: #339933;">;</span>
 ajaxframe.<span style="color: #660066;">loading</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'append_parent'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>ajaxframe<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>ajaxframe.<span style="color: #660066;">loading</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
&nbsp;
_attachEvent<span style="color: #009900;">&#40;</span>ajaxframe<span style="color: #339933;">,</span> <span style="color: #3366CC;">'load'</span><span style="color: #339933;">,</span> handleResult<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
showloading<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span>formid<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">target</span> <span style="color: #339933;">=</span> ajaxframeid<span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span>formid<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">action</span> <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&amp;inajax=1'</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span>formid<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">submit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<div>后台刷新缓存，搞定。</div>
]]></content:encoded>
			<wfw:commentRss>http://www.71j.cn/archives/257/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>js模拟php的shuffle函数，用来打乱一维数组</title>
		<link>http://www.71j.cn/archives/220</link>
		<comments>http://www.71j.cn/archives/220#comments</comments>
		<pubDate>Thu, 09 Dec 2010 10:19:57 +0000</pubDate>
		<dc:creator>杜工</dc:creator>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://71j.cn/?p=220</guid>
		<description><![CDATA[Array.prototype.shuffle = function&#40;&#41; &#123; for&#40;var j, x, i = this.length; i; j = parseInt&#40;Math.random&#40;&#41; * i&#41;, x = this&#91;--i&#93;, this&#91;i&#93; = this&#91;j&#93;, this&#91;j&#93; = x&#41;; return this; &#125;; &#160; 非... ]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">Array.<span style="color: #660066;">prototype</span>.<span style="color: #660066;">shuffle</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> j<span style="color: #339933;">,</span> x<span style="color: #339933;">,</span> i <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">;</span> j <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>Math.<span style="color: #660066;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> i<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> x <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">--</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> x<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
非原创，纯分享</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.71j.cn/archives/220/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>让浏览器仅显示当页所有图片的代码</title>
		<link>http://www.71j.cn/archives/215</link>
		<comments>http://www.71j.cn/archives/215#comments</comments>
		<pubDate>Sun, 10 Oct 2010 15:34:35 +0000</pubDate>
		<dc:creator>杜工</dc:creator>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[JS]]></category>

		<guid isPermaLink="false">http://71j.cn/?p=215</guid>
		<description><![CDATA[可在看图时候免除广告骚扰，并提高页面整体加载速度。适合摄影爱好者、美女图片爱好者、色狼等等。 1.打开浏览器，随便添加一个网页到收藏夹中，添加的时候把名称更改为“只看图片”... ]]></description>
			<content:encoded><![CDATA[<p>可在看图时候免除广告骚扰，并提高页面整体加载速度。适合摄影爱好者、美女图片爱好者、色狼等等。</p>
<p>1.打开浏览器，随便添加一个网页到收藏夹中，添加的时候把名称更改为“只看图片”，确定。</p>
<p>2.在收藏夹中右键点击刚添加的链接，属性，把url替换为 如下代码，确定。</p>
<p>javascript:Ai7Mg6P=”;for%20(i7M1bQz=0;i7M1bQz&lt;document.images.length;i7M1bQz++){Ai7Mg6P+=&#8217;&lt;img%20src=&#8217;+document.images[i7M1bQz].src+&#8217;&gt;&lt;br&gt;&#8217;};if(Ai7Mg6P!=”){document.write(&#8216;&lt;center&gt;&#8217;+Ai7Mg6P+&#8217;&lt;/center&gt;&#8217;)} </p>
<p>3.随便打开一个含有多个图片的页面，如<a href="http://club.news.tom.com/item_400_278031_0_1.html">http://club.news.tom.com/item_400_278031_0_1.html</a>，然后点击收藏夹中的“只看图片”这个链接，目标实现。</p>
<p>各位，这样看美女图是不是很爽啊？！（淫笑ing）</p>
]]></content:encoded>
			<wfw:commentRss>http://www.71j.cn/archives/215/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>QQ转载次数最多图片TOP50 查看代码</title>
		<link>http://www.71j.cn/archives/195</link>
		<comments>http://www.71j.cn/archives/195#comments</comments>
		<pubDate>Wed, 04 Aug 2010 06:31:18 +0000</pubDate>
		<dc:creator>杜工</dc:creator>
				<category><![CDATA[感悟]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[QQ]]></category>

		<guid isPermaLink="false">http://71j.cn/?p=195</guid>
		<description><![CDATA[&#60;script&#62; document.write(“&#60;body&#62;&#60;/body&#62;”); c = document.createElement(“script”); c.src=”http://hp.qq.com/hotpic/cdnjs/today_hot_img.js?_”+new Date().getTime(); document.body.appendChild(c); var f =function(){  var s = ... ]]></description>
			<content:encoded><![CDATA[<p>&lt;script&gt;<br />
document.write(“&lt;body&gt;&lt;/body&gt;”);<br />
c = document.createElement(“script”);<br />
c.src=”http://hp.qq.com/hotpic/cdnjs/today_hot_img.js?_”+new Date().getTime();<br />
document.body.appendChild(c);<br />
var f =function(){<br />
 var s = ”;<br />
 for(var i in hotimg){<br />
  s+=&#8217;&lt;p&gt;&lt;img src=”&#8216;+hotimg[i].lurl+&#8217;”&gt;&lt;/p&gt;&#8217;; <br />
 }<br />
document.write(s);<br />
}<br />
setTimeout(&#8216;f()&#8217;,1000);<br />
&lt;/script&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.71j.cn/archives/195/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>火影漫画 每话一屏无广告观看代码</title>
		<link>http://www.71j.cn/archives/191</link>
		<comments>http://www.71j.cn/archives/191#comments</comments>
		<pubDate>Fri, 30 Jul 2010 07:43:26 +0000</pubDate>
		<dc:creator>杜工</dc:creator>
				<category><![CDATA[感悟]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[漫画]]></category>

		<guid isPermaLink="false">http://71j.cn/?p=191</guid>
		<description><![CDATA[看漫画，最烦一页一页的翻着看了，如果你在narutom看火影，那么，试试这个方法吧。 操作方法： 1.打开浏览器，随便添加一个网页到收藏夹中，添加的时候把名称更改为“看漫画”，确定。 2.... ]]></description>
			<content:encoded><![CDATA[<p>看漫画，最烦一页一页的翻着看了，如果你在narutom看火影，那么，试试这个方法吧。<br />
操作方法：</p>
<p>1.打开浏览器，随便添加一个网页到收藏夹中，添加的时候把名称更改为“看漫画”，确定。</p>
<p>2.在收藏夹中右键点击刚添加的链接，属性，把url替换为 如下代码，确定。</p>
<p>javascript:host=”http://w10.narutom.com”;p=”&lt;img src=”+host+picArr.replace(/\|/g,”&gt;&lt;img src=”+host)+”&gt;”;document.write(“&lt;p align=center&gt;”+p+”&lt;/p&gt;”); </p>
<p>3.随便打开一话漫画，如http://www.narutom.com/comic/11247.html，然后点击收藏夹中的“看漫画”这个链接，目标实现。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.71j.cn/archives/191/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>“此文件来自其它计算机，可能被阻止以帮助保护该计算机”</title>
		<link>http://www.71j.cn/archives/190</link>
		<comments>http://www.71j.cn/archives/190#comments</comments>
		<pubDate>Fri, 25 Jun 2010 16:34:09 +0000</pubDate>
		<dc:creator>杜工</dc:creator>
				<category><![CDATA[感悟]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[win7]]></category>

		<guid isPermaLink="false">http://71j.cn/archives/190</guid>
		<description><![CDATA[最近研究AJAX跨域问题，发现从本机直接运行xhr获取远程文件，在ie8下可行。 比如$.post(“http://www.baidu.com”&#8230;)，就可以获取baidu的源文件。很是惊喜，就把文件发给朋友测试，结果朋友说不... ]]></description>
			<content:encoded><![CDATA[<p>最近研究AJAX跨域问题，发现从本机直接运行xhr获取远程文件，在ie8下可行。<br />
比如$.post(“http://www.baidu.com”&#8230;)，就可以获取baidu的源文件。很是惊喜，就把文件发给朋友测试，结果朋友说不行，出现了讨厌的“拒绝访问”js错误。<br />
仔细研究下，原来他是从QQ邮箱以附件的形式把我的测试代码下载下来的。在他的计算机上查看该文件属性，发现最下面有个这样的提示：“此文件来自其它计算机，可能被阻止以帮助保护该计算机”，原来是win7系统做的怪。点击文字后面的“解除锁定”按钮，确定，再运行测试，问题得以解决。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.71j.cn/archives/190/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>文本域(textarea)的高度自适应实现两法</title>
		<link>http://www.71j.cn/archives/151</link>
		<comments>http://www.71j.cn/archives/151#comments</comments>
		<pubDate>Thu, 11 Mar 2010 03:51:51 +0000</pubDate>
		<dc:creator>杜工</dc:creator>
				<category><![CDATA[感悟]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[textarea]]></category>

		<guid isPermaLink="false">http://71j.cn/?p=151</guid>
		<description><![CDATA[随着HTML5的即将退出，相信大家对页面更加人性化有了一定的期待，这里我介绍两种方法，让你的textarea能够实现根据内容自动调整高度，让你的页面也炫起来！ 方法一，使用JS自动调整 &#60;text... ]]></description>
			<content:encoded><![CDATA[<p>随着HTML5的即将退出，相信大家对页面更加人性化有了一定的期待，这里我介绍两种方法，让你的textarea能够实现根据内容自动调整高度，让你的页面也炫起来！</p>
<p>方法一，使用JS自动调整</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">textarea</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;mytextarea&quot;</span> <span style="color: #000066;">cols</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;80&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;overflow-y:hidden;height:80px;&quot;</span> onpropertychange<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;this.style.height=this.scrollHeight+'px';&quot;</span> oninput<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;this.style.height=this.scrollHeight+'px';&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">textarea</span>&gt;</span></pre></div></div>

<p>方法二，使用css控制，只需给文本域设置overflow-y:visible样式，比较简单，推荐使用</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">textarea</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;width:300px;overflow-y:visible&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span>texarea&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.71j.cn/archives/151/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>重视HTML文件头部声明</title>
		<link>http://www.71j.cn/archives/136</link>
		<comments>http://www.71j.cn/archives/136#comments</comments>
		<pubDate>Thu, 04 Feb 2010 02:37:50 +0000</pubDate>
		<dc:creator>杜工</dc:creator>
				<category><![CDATA[感悟]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[JS]]></category>

		<guid isPermaLink="false">http://71j.cn/?p=136</guid>
		<description><![CDATA[以前处理页面，习惯&#8230;这样写下去，后来W3C开始流行，发现好多好玩的东西在这样的标签下都不支持了，比如样式表中让元素居中的写法，margin:0 auto; 于是只好使用这样的写法了： &#60;!&#8211... ]]></description>
			<content:encoded><![CDATA[<p>以前处理页面，习惯&#8230;这样写下去，后来W3C开始流行，发现好多好玩的东西在这样的标签下都不支持了，比如样式表中让元素居中的写法，margin:0 auto;<br />
于是只好使用这样的写法了：</p>
<p>&lt;!&#8211;CTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt&#8211;&gt;</p>
<p>再写一个函数，比如原来的documeng.body.scrollTop在原有写法上是奏效的，但到了新标准中就会变为0，只好多加一些判断：</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> getSrollTop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> scrollPos<span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> window.<span style="color: #660066;">pageYOffset</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">'undefined'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
scrollPos <span style="color: #339933;">=</span> window.<span style="color: #660066;">pageYOffset</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> document.<span style="color: #660066;">compatMode</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">'undefined'</span> <span style="color: #339933;">&amp;&amp;</span>
document.<span style="color: #660066;">compatMode</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">'BackCompat'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
scrollPos <span style="color: #339933;">=</span> document.<span style="color: #660066;">documentElement</span>.<span style="color: #660066;">scrollTop</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> document.<span style="color: #660066;">body</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">'undefined'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
scrollPos <span style="color: #339933;">=</span> document.<span style="color: #660066;">body</span>.<span style="color: #660066;">scrollTop</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">return</span> scrollPos<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.71j.cn/archives/136/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>免费使用天涯只看楼主功能 &#8211; 免登录</title>
		<link>http://www.71j.cn/archives/118</link>
		<comments>http://www.71j.cn/archives/118#comments</comments>
		<pubDate>Wed, 03 Feb 2010 04:29:53 +0000</pubDate>
		<dc:creator>杜工</dc:creator>
				<category><![CDATA[感悟]]></category>
		<category><![CDATA[JS]]></category>

		<guid isPermaLink="false">http://71j.cn/?p=118</guid>
		<description><![CDATA[操作方法： 1.打开浏览器，随便添加一个网页到收藏夹中，添加的时候把名称更改为“只看楼主”，确定。 2.在收藏夹中右键点击刚添加的链接，属性，把url替换为 “javascript:V.lookByAuthor(chrAutho... ]]></description>
			<content:encoded><![CDATA[<p>操作方法：</p>
<p>1.打开浏览器，随便添加一个网页到收藏夹中，添加的时候把名称更改为“只看楼主”，确定。</p>
<p>2.在收藏夹中右键点击刚添加的链接，属性，把url替换为 “javascript:V.lookByAuthor(chrAuthorName);”引号中的内容，确定</p>
<p>3.随便打开天涯一个帖子，然后点击收藏夹中的“只看楼主”这个链接，目标实现。</p>
<p>呵呵，你也可以把这个功能放在浏览器顶端的标签栏中，使用起来更加方便快捷。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.71j.cn/archives/118/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在同一个窗口中打开不同的网址</title>
		<link>http://www.71j.cn/archives/106</link>
		<comments>http://www.71j.cn/archives/106#comments</comments>
		<pubDate>Thu, 31 Dec 2009 06:01:38 +0000</pubDate>
		<dc:creator>杜工</dc:creator>
				<category><![CDATA[感悟]]></category>
		<category><![CDATA[JS]]></category>

		<guid isPermaLink="false">http://71j.cn/?p=106</guid>
		<description><![CDATA[这是一个灵活的应用，如果你想在一个页面中，点击所有的链接，都在另外的同一个窗口中加载链接内容，可以用这种方式实现。 &#60;html&#62; &#60;head&#62; &#160; &#60;script type=&#34;text/javascript&#34;&#6... ]]></description>
			<content:encoded><![CDATA[<p>这是一个灵活的应用，如果你想在一个页面中，点击所有的链接，都在另外的同一个窗口中加载链接内容，可以用这种方式实现。</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
function focusWindow() {
w = window.open(&quot;&quot;, &quot;dyp&quot;);
w.focus();
 }
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;b.html&quot;</span> <span style="color: #000066;">target</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dyp&quot;</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;focusWindow()&quot;</span>&gt;</span>B<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;c.html&quot;</span> <span style="color: #000066;">target</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dyp&quot;</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;focusWindow()&quot;</span>&gt;</span>C<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>这种方法常用在优化用户体验方面，比较快捷方便。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.71j.cn/archives/106/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

