<?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>贰陆的博客</title>
	<atom:link href="http://www.qianduankaifa.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.qianduankaifa.com</link>
	<description>贰陆的前端开发之路</description>
	<lastBuildDate>Wed, 18 Jan 2012 03:42:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>利用jQuery给带有postback的asp:button添加前置onclick事件</title>
		<link>http://www.qianduankaifa.com/postback-aspbutton-add-clickevent-by-jquery/</link>
		<comments>http://www.qianduankaifa.com/postback-aspbutton-add-clickevent-by-jquery/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 03:39:28 +0000</pubDate>
		<dc:creator>贰陆</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[postback]]></category>

		<guid isPermaLink="false">http://www.qianduankaifa.com/?p=485</guid>
		<description><![CDATA[<p>
	在ASP.NET开发中，时常会遇到提交按钮是带有postback的，页面会自动给按钮生成类似onclick=&#34;javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&#38;quot;ctl00$main$btnSave&#38;quot;, &#38;quot;&#38;quot;, true, &#38;quot;&#38;quot;, &#38;quot;&#38;quot;, false, false))&#34;的代码，如果想在提交之前添加类似表单验证的事件，会比较麻烦，因为DOM属性中的onclick事件会先执行，需要进行适当处理。</p>
<p>
	下面是个HTML的Sample，可以说明此问题。</p>
<pre class="brush:xhtml;title:'HTML';first-line:1;pad-line-numbers:true;highlight:null;collapse:false;">
&#60;input type=&#34;button&#34; id=&#34;j_testButton&#34; value=&#34;假定这是一个包含onclick属性的按钮&#34; onclick=&#34;javascript:alert(&#39;这是DOM属性中的onclick事件&#39;);&#34; /&#62;
&#60;script src=&#34;http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;
&#60;script type=&#34;text/javascript&#34;&#62;
$(function() {
	var $btn = $(&#34;#j_testButton&#34;),
		_orgEvent = $btn[0].getAttribute(&#34;onclick&#34;).replace(&#34;javascript:&#34;,&#34;&#34;);
	$btn.attr(&#34;onclick&#34;, null)
		.removeAttr(&#34;onclick&#34;)
		.bind(&#34;click&#34;, function() {
			alert(&#34;这是jQuery绑定的前置onclick事件&#34;);
			eval(_orgEvent);
		});
});
&#60;/script&#62;</pre>
<p>
	<a href="http://www.qianduankaifa.com/demo/postback-aspbutton-add-clickevent-by-jquery.html" target="_blank">点击查看演示</a></p>]]></description>
		<wfw:commentRss>http://www.qianduankaifa.com/postback-aspbutton-add-clickevent-by-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery扩展之TAB切换</title>
		<link>http://www.qianduankaifa.com/jquery-plugin-tab/</link>
		<comments>http://www.qianduankaifa.com/jquery-plugin-tab/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 13:13:03 +0000</pubDate>
		<dc:creator>贰陆</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[tab]]></category>

		<guid isPermaLink="false">http://www.qianduankaifa.com/?p=476</guid>
		<description><![CDATA[<p>
	HTML：</p>
<pre class="brush:xhtml;first-line:1;pad-line-numbers:true;highlight:null;collapse:false;">
&#60;div class=&#34;tab mb10&#34; tabopts=&#34;{action:&#39;click&#39;,animate:0}&#34;&#62;
	&#60;div class=&#34;tab-nav&#34;&#62;
		&#60;ul&#62;
			&#60;li class=&#34;c&#34;&#62;社会&#60;/li&#62;
			&#60;li&#62;娱乐&#60;/li&#62;
			&#60;li&#62;体育&#60;/li&#62;
			&#60;li&#62;军事&#60;/li&#62;
		&#60;/ul&#62;
	&#60;/div&#62;
	&#60;div class=&#34;tab-content&#34;&#62;1&#60;/div&#62;
	&#60;div class=&#34;tab-content hide&#34;&#62;2&#60;/div&#62;
	&#60;div class=&#34;tab-content hide&#34;&#62;3&#60;/div&#62;
	&#60;div class=&#34;tab-content hide&#34;&#62;4&#60;/div&#62;
&#60;/div&#62;

&#60;div class=&#34;tab&#34; tabopts=&#34;{action:&#39;mouseover&#39;,animate:0}&#34;&#62;
	&#60;div class=&#34;tab-nav&#34;&#62;
		&#60;ul&#62;
			&#60;li class=&#34;c&#34;&#62;社会&#60;/li&#62;
			&#60;li&#62;娱乐&#60;/li&#62;
			&#60;li&#62;体育&#60;/li&#62;
			&#60;li&#62;军事&#60;/li&#62;
		&#60;/ul&#62;
	&#60;/div&#62;
	&#60;div class=&#34;tab-content&#34;&#62;1&#60;/div&#62;
	&#60;div class=&#34;tab-content hide&#34;&#62;2&#60;/div&#62;
	&#60;div class=&#34;tab-content hide&#34;&#62;3&#60;/div&#62;
	&#60;div class=&#34;tab-content hide&#34;&#62;4&#60;/div&#62;
&#60;/div&#62;</pre>
<p>
	将js中需要用到的参数以自定义HTML属性的方式指定。</p>
<p>
	CSS：</p>
<pre class="brush:css;first-line:1;pad-line-numbers:true;highlight:null;collapse:false;">
.tab {width:600px; border:1px solid #36f;}
.tab-nav {height:26px; margin-bottom:-1px; background:#ccf;}
.tab-nav ul {}
.tab-nav li {float:left; width:100px; height:25px; border-right:1px solid #36f; font:12px/25px arial; text-align:center;}
.tab-nav li.c {height:26px; background:#fff; font-weight:700; _position:relative;}
.tab-content {border-top:1px solid #36f; padding:10px; height:240px;}</pre>
<p>
	注意_position:relative, 如果不加，IE6中高亮项的背景色无法越过tab-content的border-top。</p>
<p>
	JS:</p>
<pre class="brush:js;first-line:1;pad-line-numbers:true;highlight:null;collapse:false;">
$.fn.tab = function(option) {
	var setting = {
		action : &#34;mouseover&#34;,
		animate : 1
	};

	return this.each(function() {
		var $this    = $(this),
			opts     = $.extend({}, setting, eval(&#39;(&#39; + $this.attr(&#34;tabopts&#34;) + &#39;)&#39;)),
			$nav     = $this.find(&#34;.tab-nav&#34;),
			$content = $this.find(&#34;.tab-content&#34;);

		$nav.delegate(&#34;li&#34;, opts.action, function() {
			$(this).addClass(&#34;c&#34;).siblings().removeClass(&#34;c&#34;);
			if (opts.animate) {
				$content.hide().eq($(this).index()).fadeIn();
			} else {
				$content.addClass(&#34;hide&#34;).eq($(this).index()).removeClass(&#34;hide&#34;);
			}http://www.qianduankaifa.com/demo/tab.html
		});
	});
};
$(&#34;.tab&#34;).tab();</pre>
<p>
	接受HTML属性后，需要通过eval进行转换。</p>
<p>
	演示：<a href="http://www.qianduankaifa.com/demo/tab.html" target="_blank">http://www.qianduankaifa.com/demo/tab.html</a></p>]]></description>
		<wfw:commentRss>http://www.qianduankaifa.com/jquery-plugin-tab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery.ajax获取远程页面中部分内容时应使用filter()进行筛选</title>
		<link>http://www.qianduankaifa.com/jquery-ajax%e8%8e%b7%e5%8f%96%e8%bf%9c%e7%a8%8b%e9%a1%b5%e9%9d%a2%e4%b8%ad%e9%83%a8%e5%88%86%e5%86%85%e5%ae%b9%e6%97%b6%e5%ba%94%e4%bd%bf%e7%94%a8filter%e8%bf%9b%e8%a1%8c%e7%ad%9b%e9%80%89/</link>
		<comments>http://www.qianduankaifa.com/jquery-ajax%e8%8e%b7%e5%8f%96%e8%bf%9c%e7%a8%8b%e9%a1%b5%e9%9d%a2%e4%b8%ad%e9%83%a8%e5%88%86%e5%86%85%e5%ae%b9%e6%97%b6%e5%ba%94%e4%bd%bf%e7%94%a8filter%e8%bf%9b%e8%a1%8c%e7%ad%9b%e9%80%89/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 05:38:49 +0000</pubDate>
		<dc:creator>贰陆</dc:creator>
				<category><![CDATA[开发]]></category>

		<guid isPermaLink="false">http://www.iliawang.com/?p=387</guid>
		<description><![CDATA[<p>&#160;</p>
<p>$.ajax({</p>
<p>url: remoteContent,</p>
<p>success: function(data) {</p>
<p>$(&#34;body&#34;).html($(data).filter(&#34;#remoteContent&#34;).html());</p>
<p>}</p>
<p>});</p>]]></description>
		<wfw:commentRss>http://www.qianduankaifa.com/jquery-ajax%e8%8e%b7%e5%8f%96%e8%bf%9c%e7%a8%8b%e9%a1%b5%e9%9d%a2%e4%b8%ad%e9%83%a8%e5%88%86%e5%86%85%e5%ae%b9%e6%97%b6%e5%ba%94%e4%bd%bf%e7%94%a8filter%e8%bf%9b%e8%a1%8c%e7%ad%9b%e9%80%89/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE6的z-index</title>
		<link>http://www.qianduankaifa.com/ie6%e7%9a%84z-index/</link>
		<comments>http://www.qianduankaifa.com/ie6%e7%9a%84z-index/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 01:36:02 +0000</pubDate>
		<dc:creator>贰陆</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[z-index]]></category>

		<guid isPermaLink="false">http://www.iliawang.com/?p=384</guid>
		<description><![CDATA[<p>IE6下，决定层级高低的不是当前的父标签，而是整个DOM tree（节点树）的第一个relative属性的父标签。</p>]]></description>
		<wfw:commentRss>http://www.qianduankaifa.com/ie6%e7%9a%84z-index/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>几个问题</title>
		<link>http://www.qianduankaifa.com/a-few-questions/</link>
		<comments>http://www.qianduankaifa.com/a-few-questions/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 03:27:10 +0000</pubDate>
		<dc:creator>贰陆</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[web重构]]></category>
		<category><![CDATA[前端规范]]></category>
		<category><![CDATA[性能]]></category>

		<guid isPermaLink="false">http://www.iliawang.com/?p=380</guid>
		<description><![CDATA[<p>1、为何要将js放在页面最后加载？<br />
	2、影响网站性能有哪些前端方面的因素？<br />
	3、前端如何与运营、产品进行协助？<br />
	4、WEB重构主要是做什么样的工作？<br />
	5、常见的网站js方法<br />
	6、前端规范主要包括哪些内容？<br />
	7、前端流程是怎么样的？</p>]]></description>
		<wfw:commentRss>http://www.qianduankaifa.com/a-few-questions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>不要使用value作为li的自定义属性</title>
		<link>http://www.qianduankaifa.com/dont-use-value-as-li-defined-attribute/</link>
		<comments>http://www.qianduankaifa.com/dont-use-value-as-li-defined-attribute/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 09:38:28 +0000</pubDate>
		<dc:creator>贰陆</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[li]]></category>
		<category><![CDATA[自定义属性]]></category>

		<guid isPermaLink="false">http://www.iliawang.com/?p=378</guid>
		<description><![CDATA[<p>如果想利用DOM的自定义属性，不要给li设置value，不管给li的value属性设置什么值，返回的都是整型值。</p>
<p>但是，如果通过getAttribute还是能获得真实属性值的。而用obj.value和jQuery等类库中的attr方法是不行的。</p>]]></description>
		<wfw:commentRss>http://www.qianduankaifa.com/dont-use-value-as-li-defined-attribute/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>利用jQuery检测checkbox是否有选中</title>
		<link>http://www.qianduankaifa.com/checkbox-is-checked-jquery/</link>
		<comments>http://www.qianduankaifa.com/checkbox-is-checked-jquery/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 04:26:33 +0000</pubDate>
		<dc:creator>贰陆</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[checkbox]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.iliawang.com/?p=374</guid>
		<description><![CDATA[<p>利用jQuery的:checked选择器返回size()即可。</p>
<p>$(&#34;input[name=&#39;aaa&#39;]:checked&#34;).size()</p>
<p>演示地址：<a href="http://demo.iliawang.com/checkbox-check-jquery.html" target="_blank">http://demo.iliawang.com/checkbox-check-jquery.html</a><br />
	通过IE6、IE7、IE8、FF、Chrome</p>]]></description>
		<wfw:commentRss>http://www.qianduankaifa.com/checkbox-is-checked-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DedeCMS添加FLV视频播放支持</title>
		<link>http://www.qianduankaifa.com/dedecms%e6%b7%bb%e5%8a%a0flv%e8%a7%86%e9%a2%91%e6%92%ad%e6%94%be%e6%94%af%e6%8c%81/</link>
		<comments>http://www.qianduankaifa.com/dedecms%e6%b7%bb%e5%8a%a0flv%e8%a7%86%e9%a2%91%e6%92%ad%e6%94%be%e6%94%af%e6%8c%81/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 02:19:32 +0000</pubDate>
		<dc:creator>贰陆</dc:creator>
				<category><![CDATA[DedeCMS&WordPress]]></category>
		<category><![CDATA[dedecms]]></category>
		<category><![CDATA[fckeditor]]></category>
		<category><![CDATA[FLV]]></category>

		<guid isPermaLink="false">http://www.iliawang.com/?p=367</guid>
		<description><![CDATA[<p>DedeCMS默认不支持播放flv视频，真是个悲剧。还好是开源的，自己随意捣鼓。</p>
<p>修改方法：</p>
<p>1、打开/include/FCKeditor/editor/dialog/dede_media.htm<br />
	在</p>
<p>&#160;</p>
<blockquote>
	<p>&#160;&#160;if(playtype==&#34;rm&#34;</p>
	<p>&#160;&#160; &#124;&#124; (playtype==&#34;-&#34; &#38;&#38; (rurl.indexOf(&#39;.rm&#39;)&#62;0 &#124;&#124; rurl.indexOf(&#39;.rmvb&#39;)&#62;0 &#124;&#124; rurl.indexOf(&#39;.ram&#39;)&#62;0)) )</p>
	<p>&#160;&#160;{</p>
	<p>&#160;&#160; &#160;revalue = &#34;&#60;embed src=&#39;&#34;+ rurl +&#34;&#39; quality=&#39;hight&#39; wmode=&#39;transparent&#39; type=&#39;audio/x-pn-realaudio-plugin&#39; autostart=&#39;true&#39; controls=&#39;IMAGEWINDOW,ControlPanel,StatusBar&#39; console=&#39;Clip1&#39; width=&#39;&#34;+ widthdd +&#34;&#39; height=&#39;&#34;+ heightdd +&#34;&#39;&#62;&#60;/embed&#62;\r\n&#34;;</p>
	<p>&#160;&#160;}</p>
</blockquote>
<p>下面添加以下内容：</p>
<p>&#160;</p>
<blockquote>
	<p>&#160;&#160;//播放代码flv开始</p>
	<p>&#160;&#160;else if(playtype==&#34;flv&#34; &#124;&#124; (playtype==&#34;-&#34; &#38;&#38; (rurl.indexOf(&#39;.flv&#39;)&#62;0 &#124;&#124; rurl.indexOf(&#39;.swf&#39;)&#62;0)) )</p>
	<p>&#160;&#160;{</p>
	<p>&#160;&#160; &#160;revalue = &#34;&#60;object id=&#39;player&#39; classid=&#39;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&#39; name=&#39;player&#39; width=&#39;&#34;+ widthdd +&#34;&#39; height=&#39;&#34;+ heightdd +&#34;&#39;&#62; \r\n&#60;param name=&#39;movie&#39; value=&#39;/plus/player.swf&#39;&#62;\r\n&#60;param name=&#39;allowfullscreen&#39; value=&#39;true&#39;&#62;\r\n&#60;param name=&#39;allowscriptaccess&#39; value=&#39;always&#39;&#62;\r\n&#60;param name=&#39;flashvars&#39; value=&#39;file=&#34;+ rurl +&#34;&#39;&#62;\r\n&#60;/object&#62;&#34;;//播放代码flv开始结束</p>
	<p>&#160;&#160;}</p>
</blockquote>
<p>2、上传player.swf到/plus目录，搞定</p>
<p>使用时直接在Fckeditor中使用&#8220;插入多媒体&#8221;功能，输入flv结尾的视频地址和高宽度即可。</p>
<p><a href="http://www.iliawang.com/wp-content/uploads/player.rar" target="_blank">附件player.swf下载</a></p>]]></description>
		<wfw:commentRss>http://www.qianduankaifa.com/dedecms%e6%b7%bb%e5%8a%a0flv%e8%a7%86%e9%a2%91%e6%92%ad%e6%94%be%e6%94%af%e6%8c%81/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>计算iframe高度</title>
		<link>http://www.qianduankaifa.com/%e8%ae%a1%e7%ae%97iframe%e9%ab%98%e5%ba%a6/</link>
		<comments>http://www.qianduankaifa.com/%e8%ae%a1%e7%ae%97iframe%e9%ab%98%e5%ba%a6/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 06:38:04 +0000</pubDate>
		<dc:creator>贰陆</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[高度自适应]]></category>

		<guid isPermaLink="false">http://www.iliawang.com/?p=365</guid>
		<description><![CDATA[<p>计算iframe高度，方便做到高度自适应</p>
<blockquote>
	<p>Math.min(iframe.contentWindow.window.document.documentElement.scrollHeight, iframe.contentWindow.window.document.body.scrollHeight);</p>
</blockquote>]]></description>
		<wfw:commentRss>http://www.qianduankaifa.com/%e8%ae%a1%e7%ae%97iframe%e9%ab%98%e5%ba%a6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>让Google Analytics中的内容报告显示完成的URL</title>
		<link>http://www.qianduankaifa.com/%e8%ae%a9google-analytics%e4%b8%ad%e7%9a%84%e5%86%85%e5%ae%b9%e6%8a%a5%e5%91%8a%e6%98%be%e7%a4%ba%e5%ae%8c%e6%88%90%e7%9a%84url/</link>
		<comments>http://www.qianduankaifa.com/%e8%ae%a9google-analytics%e4%b8%ad%e7%9a%84%e5%86%85%e5%ae%b9%e6%8a%a5%e5%91%8a%e6%98%be%e7%a4%ba%e5%ae%8c%e6%88%90%e7%9a%84url/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 01:36:27 +0000</pubDate>
		<dc:creator>贰陆</dc:creator>
				<category><![CDATA[运营]]></category>
		<category><![CDATA[Google Analytics]]></category>

		<guid isPermaLink="false">http://www.iliawang.com/?p=361</guid>
		<description><![CDATA[<p>Google Analytics默认报告只显示目录+文件名，是没有域名前缀的，如果有多个子域名，就杯具了，同样文件名的页面，不知道是哪个域名下的。通过设置过滤器可以让报告中显示域名，具体如下：</p>
<p><img alt="过滤器" height="397" src="http://pic.yupoo.com/blackhand_v/AVrNN05v/k843k.jpg" width="541" /></p>]]></description>
		<wfw:commentRss>http://www.qianduankaifa.com/%e8%ae%a9google-analytics%e4%b8%ad%e7%9a%84%e5%86%85%e5%ae%b9%e6%8a%a5%e5%91%8a%e6%98%be%e7%a4%ba%e5%ae%8c%e6%88%90%e7%9a%84url/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

