<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="css/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>chenfahui</title><link>http://www.chenfahui.cn/</link><description>陈发辉</description><generator>RainbowSoft Studio Z-Blog 1.8 Walle Build 100427</generator><language>zh-CN</language><copyright>Copyright 2009-2012 chenfahui.cn. Some Rights Reserved.</copyright><pubDate>Sat, 18 Feb 2012 11:28:07 +0800</pubDate><item><title>倒计时js</title><author>a@b.com (chenfahui)</author><link>http://www.chenfahui.cn/post/44.html</link><pubDate>Wed, 21 Dec 2011 09:17:04 +0800</pubDate><guid>http://www.chenfahui.cn/post/44.html</guid><description><![CDATA[<p>&nbsp;&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</p><div>&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;</div><div>&lt;head&gt;</div><div>&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;</div><div>&lt;title&gt;倒計時&lt;/title&gt;</div><div>&lt;/head&gt;</div><div>&nbsp;</div><div>&lt;body&gt;</div><div>剩余时间：&lt;span id=&quot;expireTime&quot;&gt;&lt;/span&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>&lt;script type=&quot;text/javascript&quot;&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp;var expire = 2412169;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp;var expireTime = function(expires){</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp;if(expires &gt; 0){</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var second = expires;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp;}else{</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var second = &quot;0 分&quot;;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return second;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp;}</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp;var day = hour = min = &quot;&quot;;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp;if(second&gt;86400){</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;day = Math.floor(second/86400)+&quot;天 &quot;;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;second = second%86400;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp;}</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp;if(second&gt;3600){</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hour = Math.floor(second/3600)+&quot;时 &quot;;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;second = second%3600;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp;}</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp;if(second&gt;60){</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;min = Math.floor(second/60)+&quot;分 &quot;;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;second = second%60;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp;}</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp;second = second+&quot;秒&quot;;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp;return day+hour+min+second;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp;}</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp;&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp;var timeEle = document.getElementById(&quot;expireTime&quot;);</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp;&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp;var timer = window.setInterval(function(){</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp;timeEle.innerHTML = expireTime(expire--);</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp;if(expire&lt;0){</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;clearInterval(timer);</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp; &nbsp; &nbsp;}</div><div><span class="Apple-tab-span" style="white-space:pre">	</span> &nbsp; &nbsp;},1000);</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>&lt;/script&gt;</div><div>&lt;/body&gt;</div><div>&lt;/html&gt;</div><div>&nbsp;</div><div>&nbsp;</div><p><iframe src="http://www.chenfahui.cn/ziliao/html/countdown.html" height="50" width="300" frameborder="0"></iframe></p>]]></description><category>Javascript</category><comments>http://www.chenfahui.cn/post/44.html#comment</comments><wfw:comment>http://www.chenfahui.cn/</wfw:comment><wfw:commentRss>http://www.chenfahui.cn/feed.asp?cmt=44</wfw:commentRss><trackback:ping>http://www.chenfahui.cn/cmd.asp?act=tb&amp;id=44&amp;key=f3ad77d4</trackback:ping></item><item><title> 不知道你现在何方，为何不说话</title><author>a@b.com (chenfahui)</author><link>http://www.chenfahui.cn/post/43.html</link><pubDate>Thu, 08 Dec 2011 11:21:16 +0800</pubDate><guid>http://www.chenfahui.cn/post/43.html</guid><description><![CDATA[<p>&nbsp;不知道你现在何方，为何不说话。</p><p>上周末，跟老同学散步，走到六年前第一次来到这个城市从学校出来玩的街。六年多了...</p>]]></description><category>心情随笔</category><comments>http://www.chenfahui.cn/post/43.html#comment</comments><wfw:comment>http://www.chenfahui.cn/</wfw:comment><wfw:commentRss>http://www.chenfahui.cn/feed.asp?cmt=43</wfw:commentRss><trackback:ping>http://www.chenfahui.cn/cmd.asp?act=tb&amp;id=43&amp;key=cca7356e</trackback:ping></item><item><title>跑马灯</title><author>a@b.com (chenfahui)</author><link>http://www.chenfahui.cn/post/42.html</link><pubDate>Thu, 08 Dec 2011 09:51:42 +0800</pubDate><guid>http://www.chenfahui.cn/post/42.html</guid><description><![CDATA[<p>可控制（上一条、下一条、暂停、开始）跑马灯效果：</p><p><iframe src="http://www.chenfahui.cn/ziliao/html/marquee.html" width="503" height="25" frameborder="0"></iframe></p>]]></description><category>Javascript</category><comments>http://www.chenfahui.cn/post/42.html#comment</comments><wfw:comment>http://www.chenfahui.cn/</wfw:comment><wfw:commentRss>http://www.chenfahui.cn/feed.asp?cmt=42</wfw:commentRss><trackback:ping>http://www.chenfahui.cn/cmd.asp?act=tb&amp;id=42&amp;key=b0b06163</trackback:ping></item><item><title>jquery离开页面提示</title><author>a@b.com (chenfahui)</author><link>http://www.chenfahui.cn/post/41.html</link><pubDate>Thu, 27 Oct 2011 16:27:07 +0800</pubDate><guid>http://www.chenfahui.cn/post/41.html</guid><description><![CDATA[<p>&nbsp;</p><p><span style="font-size: 10.5pt; font-family: 宋体; ">离开页面时</span><span lang="EN-US" style="font-size: 10.5pt; font-family: 'Times New Roman'; ">,</span><span style="font-size: 10.5pt; font-family: 宋体; ">检测表单元素是否被修改</span><span lang="EN-US" style="font-size: 10.5pt; font-family: 'Times New Roman'; ">,</span><span style="font-size: 10.5pt; font-family: 宋体; ">然后给出提示</span><span lang="EN-US" style="font-size: 10.5pt; font-family: 'Times New Roman'; ">.</span><span style="font-size: 10.5pt; font-family: 宋体; ">防止用户错失修改的机会，提高用户体验。</span>&nbsp;</p><p>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</p><div>&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;</div><div>&lt;head&gt;</div><div>&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;</div><div>&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.chenfahui.cn/ziliao/js/jquery-1.4.1.min.js&quot;&gt;&lt;/script&gt;</div><div>&lt;title&gt;jquery离开页面提示&lt;/title&gt;</div><div>&lt;/head&gt;</div><div>&lt;body&gt;</div><div>&lt;script type=&quot;text/javascript&quot;&gt;</div><div>window.onbeforeunload = function(){</div><div>&nbsp; &nbsp; if(is_form_changed()){return &quot;您的修改内容还没有保存，您确定离开吗？&quot;; }</div><div>}</div><div>function is_form_changed(){</div><div>&nbsp; &nbsp; //检测页面是否有保存按钮</div><div>&nbsp; &nbsp; var property_save = jQuery(&quot;#save&quot;);</div><div>&nbsp; &nbsp; //检测到保存按钮,继续检测元素是否修改</div><div>&nbsp; &nbsp; if(property_save.length&gt;0){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; var is_changed = false;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; jQuery(&quot;#property input, #property textarea, #property select&quot;).each(function(){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var _v = jQuery(this).attr('_value');</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(typeof(_v) == 'undefined')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_v = '';</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(_v != jQuery(this).val())</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; is_changed = true;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; });</div><div>&nbsp; &nbsp; &nbsp; &nbsp; return is_changed;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp; return false;</div><div>}</div><div>jQuery(document).ready(function(){</div><div>&nbsp; &nbsp; jQuery(&quot;#property input, #property textarea, #property select&quot;).each(function(){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; jQuery(this).attr('_value', jQuery(this).val());</div><div>&nbsp; &nbsp; });</div><div>});</div><div>&lt;/script&gt;</div><div>&lt;/body&gt;</div><div>&lt;/html&gt;</div><p>&nbsp;</p>]]></description><category>Javascript</category><comments>http://www.chenfahui.cn/post/41.html#comment</comments><wfw:comment>http://www.chenfahui.cn/</wfw:comment><wfw:commentRss>http://www.chenfahui.cn/feed.asp?cmt=41</wfw:commentRss><trackback:ping>http://www.chenfahui.cn/cmd.asp?act=tb&amp;id=41&amp;key=bfa01b89</trackback:ping></item><item><title>textarea高度自适应</title><author>a@b.com (chenfahui)</author><link>http://www.chenfahui.cn/post/40.html</link><pubDate>Mon, 24 Oct 2011 12:17:00 +0800</pubDate><guid>http://www.chenfahui.cn/post/40.html</guid><description><![CDATA[<p>textarea高度自适应，&nbsp;textarea随内容的增多自动增加高度。注意onpropertychange不能加this.style.height='0px';，在IE下会出现 Stack overflow at line:0 错误。</p><p>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</p><div>&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;</div><div>&lt;head&gt;</div><div>&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;</div><div>&lt;title&gt;textarea高度自适应&lt;/title&gt;</div><div>&lt;/head&gt;</div><div>&lt;body&gt;</div><div>&lt;textarea style=&quot;height:18px;line-hieght:18px;padding:3px;width:200px;overflow:hidden;resize:none&quot; onpropertychange=&quot;this.style.height=this.scrollHeight + 'px'&quot; oninput=&quot;this.style.height='0px';this.style.height=this.scrollHeight + 'px'&quot; &gt;&lt;/textarea&gt; &nbsp;</div><div>&lt;/body&gt;</div><div>&lt;/html&gt;</div><div>&nbsp;</div><div>demo:&nbsp;</div><p><textarea style="height:18px;line-hieght:18px;padding:3px;width:200px;overflow:hidden;resize:none" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height='0px';this.style.height=this.scrollHeight + 'px'"></textarea></p>]]></description><category>Div+css</category><comments>http://www.chenfahui.cn/post/40.html#comment</comments><wfw:comment>http://www.chenfahui.cn/</wfw:comment><wfw:commentRss>http://www.chenfahui.cn/feed.asp?cmt=40</wfw:commentRss><trackback:ping>http://www.chenfahui.cn/cmd.asp?act=tb&amp;id=40&amp;key=7a6765db</trackback:ping></item><item><title>判断浏览器否为IE6</title><author>a@b.com (chenfahui)</author><link>http://www.chenfahui.cn/post/39.html</link><pubDate>Wed, 19 Oct 2011 17:48:04 +0800</pubDate><guid>http://www.chenfahui.cn/post/39.html</guid><description><![CDATA[<p><strong>方法一： &nbsp;</strong></p><p>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<div>&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;</div><div>&lt;head&gt;</div><div>&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;</div><div>&lt;title&gt;判断浏览器否为IE6&lt;/title&gt;</div><div>&lt;/head&gt;</div><div>&nbsp;&lt;body&gt;</div><div>&lt;input type=&quot;submit&quot; onclick=&quot;ietester()&quot; value=&quot;点击测试&quot; /&gt;</div><div>&lt;script type=&quot;text/javascript&quot;&gt;</div><div>function ietester() {</div><div><span class="Apple-tab-span" style="white-space: pre; ">	</span>var undef,</div><div><span class="Apple-tab-span" style="white-space: pre; ">	</span>ie,</div><div><span class="Apple-tab-span" style="white-space: pre; ">	</span>v = 3,</div><div><span class="Apple-tab-span" style="white-space: pre; ">	</span>div = document.createElement('div'),</div><div><span class="Apple-tab-span" style="white-space: pre; ">	</span>all = div.getElementsByTagName('i');</div><div><span class="Apple-tab-span" style="white-space: pre; ">	</span>while (</div><div><span class="Apple-tab-span" style="white-space: pre; ">		</span>div.innerHTML = '&lt;!--[if gt IE ' + (++v) + ']&gt;&lt;i&gt;&lt;/i&gt;&lt;![endif]--&gt;',</div><div><span class="Apple-tab-span" style="white-space: pre; ">		</span>all[0]</div><div><span class="Apple-tab-span" style="white-space: pre; ">	</span>);</div><div><span class="Apple-tab-span" style="white-space: pre; ">	</span>v &gt; 4 ? ie=v : ie=undef;</div><div>&nbsp;</div><div><span class="Apple-tab-span" style="white-space: pre; ">	</span>if ( ie === 6 ) {</div><div><span class="Apple-tab-span" style="white-space: pre; ">		</span>alert('IE6');</div><div><span class="Apple-tab-span" style="white-space: pre; ">		</span>&nbsp;&nbsp; } else {</div><div><span class="Apple-tab-span" style="white-space: pre; ">		</span>alert('非ie6');</div><div><span class="Apple-tab-span" style="white-space: pre; ">		</span>&nbsp;&nbsp; }</div><div>}</div><div>&lt;/script&gt;</div><div>&lt;/body&gt;</div><div>&lt;/html&gt;</div><div>&nbsp;&nbsp;</div></p><p><input type="submit" onclick="ietester()" value="点击测试" /><script type="text/javascript">function ietester() {	var undef,	ie,	v = 3,	div = document.createElement('div'),	all = div.getElementsByTagName('i');	while (		div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',		all[0]	);	v > 4 ? ie=v : ie=undef;	if ( ie === 6 ) {		alert('IE6');		   } else {		alert('非ie6');		   }}</script></p><p>&nbsp;</p><p><strong>&nbsp;方法二：</strong></p><p>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br />&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />&lt;head&gt;<br />&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br />&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.chenfahui.cn/ziliao/js/jquery-1.4.1.min.js&quot;&gt;&lt;/script&gt;<br />&lt;title&gt;判断浏览器否为IE6&lt;/title&gt;<br />&lt;/head&gt;<br />&lt;body&gt;<br />&lt;script type=&quot;text/javascript&quot;&gt;<br />function ietester2 (){<br /><span class="Apple-tab-span" style="white-space:pre">	</span>if($.browser.msie&amp;&amp;($.browser.version == &quot;6.0&quot;)&amp;&amp;!$.support.style ){<br /><span class="Apple-tab-span" style="white-space:pre">		</span>alert(&quot;IE6&quot;)<br /><span class="Apple-tab-span" style="white-space:pre">	</span>}<br /><span class="Apple-tab-span" style="white-space:pre">	</span>else{<br /><span class="Apple-tab-span" style="white-space:pre">		</span>alert(&quot;非IE6&quot;)<br /><span class="Apple-tab-span" style="white-space:pre">	</span>}<br />};<br />&lt;/script&gt;<br />&lt;input value=&quot;点击测试&quot; type=&quot;button&quot; onclick=&quot;ietester2()&quot; /&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;</p><p>&nbsp;</p><script type="text/javascript" src="http://www.chenfahui.cn/ziliao/js/jquery-1.4.1.min.js"></script> <script type="text/javascript">function ietester2 (){	if($.browser.msie&&($.browser.version == "6.0")&&!$.support.style ){		alert("IE6")	}	else{		alert("非IE6")	}};</script><p><input value="点击测试" type="button" onclick="ietester2()" /></p><p>&nbsp;</p>]]></description><category>Javascript</category><comments>http://www.chenfahui.cn/post/39.html#comment</comments><wfw:comment>http://www.chenfahui.cn/</wfw:comment><wfw:commentRss>http://www.chenfahui.cn/feed.asp?cmt=39</wfw:commentRss><trackback:ping>http://www.chenfahui.cn/cmd.asp?act=tb&amp;id=39&amp;key=240ef592</trackback:ping></item><item><title>取得div的top值和left值</title><author>a@b.com (chenfahui)</author><link>http://www.chenfahui.cn/post/38.html</link><pubDate>Mon, 17 Oct 2011 14:29:12 +0800</pubDate><guid>http://www.chenfahui.cn/post/38.html</guid><description><![CDATA[<p>&nbsp;</p><div style="background-color: rgb(255, 255, 255); padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Arial, Verdana, sans-serif; font-size: 12px; line-height: 160%; ">要取得top值和left值，先要把这个div的定位设为 relative 或者 absolute<pre id="best-answer-content" class="reply-text mb10">比如：&lt;div id=&quot;txtArea&quot; style=&quot;width:470;height:25;position:relative;left:0;top:0;&quot;&gt;&lt;/div&gt; </pre><br /><pre id="best-answer-content" class="reply-text mb10">top值： document.getElementById('txtArea').offsetTop+document.body.scrollTop</pre><pre id="best-answer-content" class="reply-text mb10">left值：document.getElementById('txtArea').offsetLeft;</pre></div><p>&nbsp;</p>]]></description><category>Javascript</category><comments>http://www.chenfahui.cn/post/38.html#comment</comments><wfw:comment>http://www.chenfahui.cn/</wfw:comment><wfw:commentRss>http://www.chenfahui.cn/feed.asp?cmt=38</wfw:commentRss><trackback:ping>http://www.chenfahui.cn/cmd.asp?act=tb&amp;id=38&amp;key=9737729d</trackback:ping></item><item><title>SWFUpload 多文件图片上传</title><author>a@b.com (chenfahui)</author><link>http://www.chenfahui.cn/post/37.html</link><pubDate>Sat, 15 Oct 2011 15:01:05 +0800</pubDate><guid>http://www.chenfahui.cn/post/37.html</guid><description><![CDATA[<p>中文文档地址是：<span lang="EN-US"><a target="_blank" href="http://www.v-sky.com/doc/swfupload/Documentation.html">http://www.v-sky.com/doc/swfupload/Documentation.html</a></span></p><p class="MsoNormal" align="left" style="text-align: left; "><span style="font-size: 12pt; font-family: 宋体; ">网官上的<span lang="EN-US">DEMO</span>为：<span lang="EN-US"><a target="_blank" href="http://demo.swfupload.org/v220/index.htm">http://demo.swfupload.org/v220/index.htm</a><o:p></o:p></span></span></p><p class="MsoNormal" align="left" style="text-align: left; "><span style="font-size: 12pt; font-family: 宋体; ">下载地址：<span lang="EN-US"><a href="http://code.google.com/p/swfupload/">http://code.google.com/p/swfupload/</a><o:p></o:p></span></span></p><p class="MsoNormal" align="left" style="text-align: left; "><span lang="EN-US" style="font-size: 12pt; font-family: 宋体; "><a href="http://www.swfupload.org/">SWFUpload</a></span><span style="font-size: 12pt; font-family: 宋体; ">最初是由<span lang="EN-US"><a href="http://www.vinterwebb.se/">Vinterwebb.se</a></span>开发的一个客户端的上传工具<span lang="EN-US">.&nbsp;</span>它结合了<span lang="EN-US">FLASH</span>和<span lang="EN-US">JavaScript</span>的功能，以提供一种超越了传统的浏览器中<span lang="EN-US">&lt;input type=&quot;file&quot; /&gt;</span>标签提供的文件上传功能。<span lang="EN-US"><o:p></o:p></span></span></p><p class="MsoNormal" align="left" style="text-align: left; "><span lang="EN-US" style="font-size: 12pt; font-family: 宋体; ">SWFUpload</span><span style="font-size: 12pt; font-family: 宋体; ">提供的主要功能<span lang="EN-US">:<o:p></o:p></span></span></p><ul type="disc">    <li class="MsoNormal" style="text-align: left; "><span style="font-size: 12pt; font-family: 宋体; ">在文件选择对话框中能够进行文件多选<span lang="EN-US"><o:p></o:p></span></span></li>    <li class="MsoNormal" style="text-align: left; "><span style="font-size: 12pt; font-family: 宋体; ">页面无刷新的上传<span lang="EN-US"><o:p></o:p></span></span></li>    <li class="MsoNormal" style="text-align: left; "><span style="font-size: 12pt; font-family: 宋体; ">提供上传进度的事件回调，实时显示上传进度<span lang="EN-US"><o:p></o:p></span></span></li>    <li class="MsoNormal" style="text-align: left; "><span style="font-size: 12pt; font-family: 宋体; ">良好的浏览器兼容性<span lang="EN-US"><o:p></o:p></span></span></li>    <li class="MsoNormal" style="text-align: left; "><span style="font-size: 12pt; font-family: 宋体; ">采用了命名空间以兼容其它<span lang="EN-US">JS</span>的库<span lang="EN-US">&nbsp;(</span>例如<span lang="EN-US">&nbsp;jQuery, Prototype,&nbsp;</span>等等<span lang="EN-US">)<o:p></o:p></span></span></li>    <li class="MsoNormal" style="text-align: left; "><span lang="EN-US" style="font-size: 12pt; font-family: 宋体; "><span>&nbsp;</span><o:p></o:p></span></li>    <li class="MsoNormal" style="text-align: left; "><span style="font-size: 12pt; font-family: 宋体; ">对<span lang="EN-US">FLASH 9</span>和<span lang="EN-US">FLASH 10</span>播放器的支持<span lang="EN-US">(V<st1:chsdate isrocdate="False" islunardate="False" day="30" month="12" year="1899" w:st="on">2.2.0</st1:chsdate></span>版本放弃了对<span lang="EN-US">Flash 8</span>的支持<span lang="EN-US">)<o:p></o:p></span></span></li></ul><p class="MsoNormal" align="left" style="text-align: left; "><span lang="EN-US" style="font-size: 12pt; font-family: 宋体; ">SWFUpload</span><span style="font-size: 12pt; font-family: 宋体; ">背后的设计思想和其它基于<span lang="EN-US">Flash</span>的上传工具是不同的。它将浏览器的中<span lang="EN-US">UI</span>交给开发人员来控制。开发人员能够利用<span lang="EN-US">XHTML,CSS,Javascript</span>来定制符合他们网站风格的<span lang="EN-US">UI</span>上传元素。然后使用它提供的一组简单的<span lang="EN-US">JS</span>事件来更新上传状态，开发人员能够利用这些事件来及时更新页面中的上传进度<span lang="EN-US">UI</span>。<span lang="EN-US"><o:p></o:p></span></span></p><p class="MsoNormal" align="left" style="text-align: left; "><span style="font-size: 12pt; font-family: 宋体; ">不幸的是<span lang="EN-US">Flash Player 10&nbsp;</span>更严格的安全机制迫使我们不得不将一个<span lang="EN-US">Flash Button</span>放入<span lang="EN-US">Flash</span>影片中。<span lang="EN-US">SWFUpload</span>提供<span lang="EN-US">API</span>供开发者通过图片、文字、<span lang="EN-US">CSS</span>的方式来自定制更灵活的<span lang="EN-US">UI</span>显示。</span></p><p class="MsoNormal" align="left" style="text-align: left; ">&nbsp;</p><p class="MsoNormal" align="left" style="text-align: left; ">...</p>]]></description><category>Jquery</category><comments>http://www.chenfahui.cn/post/37.html#comment</comments><wfw:comment>http://www.chenfahui.cn/</wfw:comment><wfw:commentRss>http://www.chenfahui.cn/feed.asp?cmt=37</wfw:commentRss><trackback:ping>http://www.chenfahui.cn/cmd.asp?act=tb&amp;id=37&amp;key=8671fb09</trackback:ping></item><item><title>contentEditable</title><author>a@b.com (chenfahui)</author><link>http://www.chenfahui.cn/post/36.html</link><pubDate>Sat, 15 Oct 2011 14:18:34 +0800</pubDate><guid>http://www.chenfahui.cn/post/36.html</guid><description><![CDATA[<p>&nbsp;contentEditable　</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;html中的一个属性。设置html的contentEditable=&lsquo;true&rsquo;时，即可开启该元素的编辑模式。</p><div class="spctrl">&nbsp;　　Html中的contentEditable的属性可以打开某些元素的可编辑状态．也许你没用 过contentEditable属性．甚至从未听说过．contentEditable的作用相当神奇．可以让div或整个网页，以及span等等元素 设置为可写．我们最常用的输入文本内容便是input与textarea  使用contentEditable属性后，可以在div,table,p,span,body,等等很多元素中输入内容．</div><div class="spctrl">&nbsp;　　如果想要整个网页可编辑，请在body标签内设置contentEditable</div><div class="spctrl">&nbsp;　　contentEditable虽不是W3C标准．经过我测试在IE6中运行正常．</div><div class="spctrl">&nbsp;　　在IE8下设置表格可写不支持，其他元素没有问题．在FireFox运行一切正常．谷歌浏览器运行一切正常</div>]]></description><category>Div+css</category><comments>http://www.chenfahui.cn/post/36.html#comment</comments><wfw:comment>http://www.chenfahui.cn/</wfw:comment><wfw:commentRss>http://www.chenfahui.cn/feed.asp?cmt=36</wfw:commentRss><trackback:ping>http://www.chenfahui.cn/cmd.asp?act=tb&amp;id=36&amp;key=36c3b875</trackback:ping></item><item><title> jQuery弹出层插件大全</title><author>a@b.com (chenfahui)</author><link>http://www.chenfahui.cn/post/35.html</link><pubDate>Fri, 14 Oct 2011 16:55:05 +0800</pubDate><guid>http://www.chenfahui.cn/post/35.html</guid><description><![CDATA[<p>&nbsp;jQuery弹出层插件大全：   <br />&nbsp;  <strong>&nbsp; 1.thickbox</strong>   <br />&nbsp;&nbsp;&nbsp;&nbsp; 目前用的比较多的，最新版本是thickbox3.1  <br />下载地址：http://jquery.com/demo/thickbox/#examples <br /><strong>&nbsp;&nbsp; 2.colorBox</strong>   <br />官方网站：http://colorpowered.com/colorbox/   <br />下载地址：http://colorpowered.com/colorbox/colorbox.zip   <br />演示实例:http://colorpowered.com/colorbox/core/example1/index.html   <br /><strong>&nbsp;&nbsp; 3.FancyBox</strong>   <br />官方网站：http://fancybox.net   <br />下载地址：http://fancybox.googlecode.com/files/jquery.fancybox-1.2.5.zip   <br />演示实例:http://fancybox.net/example   <br /><strong>&nbsp;&nbsp; 4.jQueryUI Dialog</strong>   <br />官方网站：http://jqueryui.com/demos/dialog/   <br />下载地址：http://jqueryui.com/demos/dialog/   <br />演示实例:http://jqueryui.com/demos/dialog/   <br /><strong>&nbsp; &nbsp;5.DOM window</strong>   <br />官方网站：http://swip.codylindley.com/   <br />下载地址：http://swip.codylindley.com/jquery.DOMWindow.js   <br />演示实例:http://swip.codylindley.com/DOMWindowDemo.html   <br /><strong>&nbsp; &nbsp;6.shadowbox</strong>  <br />官方网站：http://www.shadowbox-js.com/   <br />下载地址：http://www.shadowbox-js.com/download.html   <br />演示实例:http://www.shadowbox-js.com/index.html  <br /><b>&nbsp; 7.jquery插件大全</b>  <br />http://www.51jsp.cn/html/javascriptkj/20100303/6734.html  <br /><b>&nbsp; 8.jQuery <em>Impromptu</em></b>  <br />http://trentrichardson.com/Impromptu/index.php</p>]]></description><category>Javascript</category><comments>http://www.chenfahui.cn/post/35.html#comment</comments><wfw:comment>http://www.chenfahui.cn/</wfw:comment><wfw:commentRss>http://www.chenfahui.cn/feed.asp?cmt=35</wfw:commentRss><trackback:ping>http://www.chenfahui.cn/cmd.asp?act=tb&amp;id=35&amp;key=6ed74251</trackback:ping></item></channel></rss>

