<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Enjoy]]></title> 
<link>http://www.9enjoy.com/index.php</link> 
<description><![CDATA[分享、学习、提高]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Enjoy]]></copyright>
<item>
<link>http://www.9enjoy.com/html5/</link>
<title><![CDATA[HTML5初探]]></title> 
<author>enjoy &lt;&gt;</author>
<category><![CDATA[HTML+CSS+JS]]></category>
<pubDate>Fri, 14 Jan 2011 06:34:27 +0000</pubDate> 
<guid>http://www.9enjoy.com/html5/</guid> 
<description>
<![CDATA[ 
	今天化了点时间，了解了下HTML5，并且试验性的把已有的一个页面转换成html5，其实还是蛮方便的。因为HTML5几乎支持原有的所有内容，只需要调整一下文档申明，结构就行了。IE要支持html5的话，只需要加一段代码。<div class="code">&lt;!--&#91;if lt IE 9&#93;&gt;<br/>&lt;script src=&quot;http://html5shim.googlecode.com/svn/trunk/html5.js&quot;&gt;&lt;/script&gt;<br/>&lt;!&#91;endif&#93;--&gt;</div><br/>国内几乎没有IE9的用户，因此，taobao是这样写的：<div class="code">&lt;!--&#91;if IE&#93;&gt;<br/>&lt;script src=&quot;http://a.tbcdn.cn/p/fp/2011a/html5.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br/>&lt;!&#91;endif&#93;--&gt;</div><br/>两个JS的内容是一样的，代码都来自：<a href="http://remysharp.com/2009/01/07/html5-enabling-script/" target="_blank">http://remysharp.com/2009/01/07/html5-enabling-script/</a><br/><br/>以下是我整理的由原来的html转换到HTML5一些注意点：<br/><br/>文档申明：<br/><div class="code">&lt;!DOCTYPE html&gt;</div><br/>原来的根本记不住，每次都需要copy。这种写法还向前向后兼容。<br/><br/>设置页面编码：<br/>旧：&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;<br/>新：&lt;meta charset=&quot;utf-8&quot;&gt;<br/><br/>链接样式表CSS<br/><div class="code">&lt;link href=&quot;/css/comm_v3.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;</div><br/>可以不写type=&quot;text/css&quot;了，浏览器只要看到rel=”stylesheet”就知道你是链接样式表了。<br/><div class="code">&lt;link href=&quot;/css/comm_v3.css&quot; rel=&quot;stylesheet&quot;&gt;</div><br/><br/>加载JS<br/><div class="code">&lt;script src=&quot;/js/html5.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</div><br/>可以不写 type=&quot;text/javascript&quot;，浏览器默认的脚本语言就是javascript。<br/><div class="code">&lt;script src=&quot;/js/html5.js&quot;&gt;&lt;/script&gt;</div><br/><br/><br/>可以简单的把所有内容都包装在一个链接元素中<br/><div class="code">&lt;h2&gt;&lt;a href=&quot;/path/to/resource&quot;&gt;Headline text&lt;/a&gt;&lt;/h2&gt;<br/>&lt;p&gt;&lt;a href=&quot;/path/to/resource&quot;&gt;Paragraph text.&lt;/a&gt;&lt;/p&gt;</div><br/>可以改写为：<div class="code">&lt;a href=&quot;/path/to/resource&quot;&gt;<br/>&lt;h2&gt;Headline text&lt;/h2&gt;<br/>&lt;p&gt;Paragraph text.&lt;/p&gt;<br/>&lt;/a&gt;</div><br/><br/>HTML5支持已有的内容，原来的div,img,p不做任何改动，都可以在HTML5里正常使用。<br/><br/>原结构：<div class="code">&lt;body&gt;<br/>&lt;div id=&quot;header&quot;&gt;...&lt;/div&gt;<br/>&lt;div id=&quot;navigation&quot;&gt;...&lt;/div&gt;<br/>&lt;div id=&quot;main&quot;&gt;...&lt;/div&gt;<br/>&lt;div id=&quot;sidebar&quot;&gt;...&lt;/div&gt;<br/>&lt;div id=&quot;footer&quot;&gt;...&lt;/div&gt;<br/>&lt;/body&gt;</div><br/><br/>可以更改为：<div class="code">&lt;body&gt;<br/>&lt;header&gt;...&lt;/header&gt;<br/>&lt;nav&gt;...&lt;/nav&gt;<br/>&lt;section&gt;...&lt;/section&gt;<br/>&lt;aside&gt;...&lt;/aside&gt;<br/>&lt;footer&gt;...&lt;/footer&gt;<br/>&lt;/body&gt;</div><br/><br/>更多推荐阅读：《HTML5设计原理》<a href="http://www.cn-cuckoo.com/2010/10/21/the-design-of-html5-2151.html" target="_blank">http://www.cn-cuckoo.com/2010/10/21/the-design-of-html5-2151.html</a><br/><br/><br/><br/>参考：<br/><a href="http://ued.alimama.com/front-end/%E6%8B%A5%E6%8A%B1html5%EF%BC%8C%E3%80%8Ahtml5%E8%AE%BE%E8%AE%A1%E5%8E%9F%E7%90%86%E3%80%8B%E8%AF%BB%E5%90%8E%E9%9A%8F%E8%AE%B0/" target="_blank">拥抱HTML5，《HTML5设计原理》读后随记</a><br/>Tags - <a href="http://www.9enjoy.com/tags/html5/" rel="tag">html5</a> , <a href="http://www.9enjoy.com/tags/css/" rel="tag">css</a> , <a href="http://www.9enjoy.com/tags/html/" rel="tag">html</a>
]]>
</description>
</item><item>
<link>http://www.9enjoy.com/default-css/</link>
<title><![CDATA[各浏览器(IE6,IE7,IE8,FireFox...)默认CSS]]></title> 
<author>enjoy &lt;&gt;</author>
<category><![CDATA[HTML+CSS+JS]]></category>
<pubDate>Sat, 31 Jul 2010 01:23:59 +0000</pubDate> 
<guid>http://www.9enjoy.com/default-css/</guid> 
<description>
<![CDATA[ 
	各浏览器的默认CSS原文：<a href="http://www.iecss.com/" target="_blank">http://www.iecss.com/</a><br/><br/>为以防万一备份了一下，存到了我的空间上了，有时会用得着：<a href="http://www.9enjoy.com/code/default-css/" target="_blank">http://www.9enjoy.com/code/default-css/</a><br/><br/>常用浏览器默认样式下载<br/><a href="/code/default-css/css/ie-6.css" target="_blank">IE6(下载)</a><br/><a href="/code/default-css/css/ie-7.css" target="_blank">IE7(下载)</a><br/><a href="/code/default-css/css/ie-8.css" target="_blank">IE8(下载)</a><br/><a href="/code/default-css/css/ie-9.css" target="_blank">IE9(下载)</a><br/><a href="/code/default-css/css/firefox-3.6.3.css" target="_blank">Firefox 3.6.3(下载)</a><br/><br/>一般写CSS都会在头部会把一些常用的标签重置margin和padding为0，但在某些地方又要恢复原默认的CSS，这些样式就起上作用了：）<br/><br/><br/><br/>Tags - <a href="http://www.9enjoy.com/tags/ie/" rel="tag">ie</a> , <a href="http://www.9enjoy.com/tags/css/" rel="tag">css</a> , <a href="http://www.9enjoy.com/tags/firefox/" rel="tag">firefox</a>
]]>
</description>
</item><item>
<link>http://www.9enjoy.com/css-separator-line/</link>
<title><![CDATA[使用CSS实现间隔线(竖线)]]></title> 
<author>enjoy &lt;&gt;</author>
<category><![CDATA[HTML+CSS+JS]]></category>
<pubDate>Fri, 23 Apr 2010 12:45:05 +0000</pubDate> 
<guid>http://www.9enjoy.com/css-separator-line/</guid> 
<description>
<![CDATA[ 
	需要下图的效果，你会怎么实现呢？<br/><a href="http://www.9enjoy.com/attachment.php?fid=37" target="_blank"><img src="http://www.9enjoy.com/attachment.php?fid=37" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/>是不是考虑用这个？<div class="code">&lt;a href=&quot;#&quot;&gt;整机&lt;/a&gt;&#124;&lt;a href=&quot;#&quot;&gt;LCD&lt;/a&gt;</div><br/>我们来看看taobao和paipai对这块的实现，这两个站首页罗例产品分类时，都使用了这种样式：<br/><br/>paipai的实现<br/>a&#123;<br/>border-left: 1px solid #D9D9D9;<br/>margin-left: -1px;<br/>padding-left: 5px;<br/>&#125;<br/><br/>taobao的实现：<br/>a&#123;<br/>border-left: 1px solid #B7D0E4;<br/>display: inline-block;<br/>margin-left: -1px;<br/>padding: 0px 0px 0px 3px;<br/>&#125;<br/><br/>现在你会了吗？<br/><br/><br/>这段CSS很巧妙的将margin-left设为-1，将第一个border隐藏了起来，而且兼容所有的主流浏览器。这样，就不用给第一个或者最后一个样式做特殊样式处理了。如果间隔需要大些，可以很方便的通过设置padding-left和padding-right来控制。<br/>Tags - <a href="http://www.9enjoy.com/tags/css/" rel="tag">css</a>
]]>
</description>
</item><item>
<link>http://www.9enjoy.com/jquery-basic/</link>
<title><![CDATA[jQuery一些文档收集]]></title> 
<author>enjoy &lt;&gt;</author>
<category><![CDATA[HTML+CSS+JS]]></category>
<pubDate>Sun, 20 Dec 2009 05:07:21 +0000</pubDate> 
<guid>http://www.9enjoy.com/jquery-basic/</guid> 
<description>
<![CDATA[ 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jQuery是一个优秀的Javascrīpt框架，轻量级的js库(压缩后只有21k) 。其宗旨是——WRITE LESS,DO MORE,写更少的代码,做更多的事情。它兼容CSS3，还兼容各种浏览器 （IE 6.0+, FF 1.5+, Safari 2.0+, Opera 9.0+）。<br/>　　jQuery使用户能更方便地处理HTML documents、events、实现动画效果，并且方便地为网站提供AJAX交互。<br/>　　jQuery还有一个比较大的优势是，它的文档说明很全，而且各种应用也说得很详细，同时还有许多成熟的插件可供选择。<br/><br/>　　先看看几大javascript库的搜索趋势，比较jquery,yui,dojo,prototype：<br/><a href="http://www.google.com/trends?q=jquery%2Cyui%2Cdojo%2Cprototype&amp;ctab=0&amp;geo=all&amp;geor=all&amp;date=all&amp;sort=0" target="_blank">http://www.google.com/trends?q=jquery%2Cyui%2Cdojo%2Cprototype&amp;ctab=0&amp;geo=all&amp;geor=all&amp;date=all&amp;sort=0</a><br/><a href="http://www.9enjoy.com/attachment.php?fid=28" target="_blank"><img src="http://www.9enjoy.com/attachment.php?fid=28" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><a href="http://www.9enjoy.com/attachment.php?fid=29" target="_blank"><img src="http://www.9enjoy.com/attachment.php?fid=29" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>国内的情况：<br/><a href="http://www.google.cn/trends?q=jquery%2Cyui%2Cdojo%2Cprototype&amp;ctab=0&amp;geo=cn&amp;geor=all&amp;date=all&amp;sort=0" target="_blank">http://www.google.cn/trends?q=jquery%2Cyui%2Cdojo%2Cprototype&amp;ctab=0&amp;geo=cn&amp;geor=all&amp;date=all&amp;sort=0</a><br/><br/>可以看到，jQuery从创建开始，关注度就不段上升，现在基本已经是NO.1了。<br/><br/>官方：<a href="http://www.jquery.com" target="_blank">http://www.jquery.com</a><br/><br/>中文社区：<a href="http://bbs.jquery.org.cn/" target="_blank">http://bbs.jquery.org.cn/</a><br/>中文API文档：<a href="http://jquery.org.cn/visual/cn/index.xml" target="_blank">http://jquery.org.cn/visual/cn/index.xml</a><br/>jQueryAPI参考文档中文版翻译(包括jQuery 1.3 中文参考文档)：<a href="http://code.google.com/p/jquery-api-zh-cn/downloads/list" target="_blank">http://code.google.com/p/jquery-api-zh-cn/downloads/list</a><br/><br/>推荐的jQuery相关书：《锋利的jquery》 基于jQuery1.3.1，各大网上书店有售。<br/><br/>英文PDF，30分钟搞定jQuery，jQuery架构的开发者之一Simon Willison在07年讲演的幻灯片learning-jquery-in-30-minutes，这份比其之前做的jQuery in 15 minutes要详细些。<a href="http://www.slideshare.net/simon/learning-jquery-in-30-minutes" target="_blank">http://www.slideshare.net/simon/learning-jquery-in-30-minutes</a><br/><br/>此处包含一个多媒体文件，请用网页方式查看。<br/><br/><br/>《精通Javascript+jQuery》视频教程 <a href="http://learning.artech.cn/20080621.mastering-javascript-jquery.html" target="_blank">http://learning.artech.cn/20080621.mastering-javascript-jquery.html</a><br/><br/><br/><br/>Tags - <a href="http://www.9enjoy.com/tags/jquery/" rel="tag">jquery</a> , <a href="http://www.9enjoy.com/tags/js/" rel="tag">js</a>
]]>
</description>
</item><item>
<link>http://www.9enjoy.com/form_action_conflict/</link>
<title><![CDATA[FROM中有名称为action的input会和action冲突的解决]]></title> 
<author>enjoy &lt;&gt;</author>
<category><![CDATA[HTML+CSS+JS]]></category>
<pubDate>Thu, 24 Sep 2009 06:15:08 +0000</pubDate> 
<guid>http://www.9enjoy.com/form_action_conflict/</guid> 
<description>
<![CDATA[ 
	有朋友问我，同一个表单，但里面有个input的name是action，跟form里面的action会有冲突。<br/><br/>我开始还直接回答：<br/><br/>表单名为form1<br/>input里的action值是document.form1.action.value<br/>form里的action值是document.form1.action <br/>应该不会冲突。<br/><br/>但实践证明，确实会冲突。<br/><br/>当有ipnut的name为action时，通过JS给form里的action赋值时，会提示：Error:Object doesn't support this property or method。<br/><br/>在网上查了下，可以能过form的attributes来罗列form的各项属性，我测试的form名为hx。<div class="code">&nbsp;&nbsp;frm = document.hx;<br/>&nbsp;&nbsp;for(i=0;i&lt;frm.attributes.length;i++)&#123;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;document.write(frm.attributes&#91;i&#93;.name+&quot;-------Index:&quot;+i+&quot;&lt;br&gt;&quot;);&nbsp;&nbsp; <br/>&nbsp;&nbsp;&#125; </div><br/>发现action的属性是83，通过设置frm.attributes[83].value，就可以更改form中的action值。<br/>不过，在FF和Chrome下，action不是83是2，所以要兼容多个浏览器的话，还得再多判断下。<br/><br/>以下是示例代码：<div class="code">&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;title&gt;&lt;/title&gt;<br/>&lt;body&gt;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&lt;form action=&quot;&quot; method=&quot;post&quot; name=&quot;hx&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;text&quot; value=&quot;13055210000&quot; name=&quot;key&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;hidden&quot; value=&quot;&quot; name=&quot;mobile&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;hidden&quot; value=&quot;&quot; name=&quot;action&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;hidden&quot; value=&quot;&quot; name=&quot;ip&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;a href=&quot;javascript:a()&quot;&gt;a&lt;/a&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;a href=&quot;javascript:b()&quot;&gt;b&lt;/a&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/form&gt;<br/>&lt;script type=&quot;text/javascript&quot;&gt;<br/>&nbsp;&nbsp;frm = document.hx;<br/>&nbsp;&nbsp;for(i=0;i&lt;frm.attributes.length;i++)&#123;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;document.write(frm.attributes&#91;i&#93;.name+&quot;-------Index:&quot;+i+&quot;&lt;br&gt;&quot;);&nbsp;&nbsp; <br/>&nbsp;&nbsp;&#125;&nbsp;&nbsp; <br/>&nbsp;&nbsp; <br/>&nbsp;&nbsp;function a()&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;frm = document.hx;<br/>&nbsp;&nbsp;&nbsp;&nbsp;frm.attributes&#91;83&#93;.value=&quot;http://www.ip138.com:8080/search.asp&quot;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;//frm.action = &quot;http://www.ip138.com:8080/search.asp&quot;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;frm.mobile.value=frm.key.value;<br/>&nbsp;&nbsp;&nbsp;&nbsp;frm.action.value=&quot;mobile&quot;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;frm.submit();<br/>&#125;<br/>&nbsp;&nbsp;function b()&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;frm = document.hx;<br/>&nbsp;&nbsp;&nbsp;&nbsp;frm.attributes&#91;83&#93;.value=&quot;http://www.ip138.com/ips8.asp&quot;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;frm.ip.value=frm.key.value;<br/>&nbsp;&nbsp;&nbsp;&nbsp;frm.action.value=&quot;2&quot;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;frm.submit();<br/>&#125;<br/>&lt;/script&gt;<br/><br/>&lt;/body&gt;<br/>&lt;/html&gt;</div><br/>Tags - <a href="http://www.9enjoy.com/tags/form/" rel="tag">form</a> , <a href="http://www.9enjoy.com/tags/js/" rel="tag">js</a> , <a href="http://www.9enjoy.com/tags/action/" rel="tag">action</a>
]]>
</description>
</item><item>
<link>http://www.9enjoy.com/css-control-img-resize/</link>
<title><![CDATA[CSS控制图片按比例缩小]]></title> 
<author>enjoy &lt;&gt;</author>
<category><![CDATA[HTML+CSS+JS]]></category>
<pubDate>Wed, 09 Sep 2009 13:41:20 +0000</pubDate> 
<guid>http://www.9enjoy.com/css-control-img-resize/</guid> 
<description>
<![CDATA[ 
	文章里包含的图片有大有小，比如文章页面左右版式，文章内容在左侧由#content控制，设置是600px，那么当其中的图片宽度&gt;600的话，IE7下就会撑出#content(那个包含它的DIV)，IE6下的话右侧就会直接掉下来。<br/><br/>最好的解决办法，我想是底部加载的JS，判断图片宽度 &gt; 600，就等比例缩小。那么怎么用CSS来实现呢？<br/><br/>开始尝试了下，不是很满意。搜索了下，大部分文章是这样写的：<div class="code">.img &#123;<br/>max-width:600px;<br/>width:600px;<br/>width:e­xpression(document.body.clientWidth&gt;600?&quot;600px&quot;:&quot;auto&quot;);<br/>overflow:hidden;<br/>&#125; <br/><br/>◎ max-width:600px; 在IE7、FF等其他非IE浏览器下最大宽度为600px。但在IE6中无效。<br/>◎ width:600px; 在所有浏览器中图片的大小为600px;<br/>◎ 当图片大小大于600px，自动缩小为600px。在IE6中有效。<br/>◎ overflow:hidden; 超出的部分隐藏，避免控制图片大小失败而引起的撑开变形。 <br/></div><br/><br/>这个方案我测试是错误的，当图片是1000px*1000px的时候，应用此CSS，图片宽度将变成600px，而高度还是1000px，图片就严重变形！既然用到了expression(有点费客户端资源)，那就索性把JS那套拿过来用吧，改写一下。<div class="code">#content img&#123;height: expression(this.width &gt; 600 ? this.height = this.height * 600 / this.width : &quot;auto&quot;);<br/>width: expression(this.width &gt; 600 ? &quot;600px&quot; : &quot;auto&quot;);<br/>max-width:600px;&#125;</div><br/>在IE6、IE7下可以实际大图片按比例缩小，不会出现图片变形的情况，在FF和chrome下，expression无效，但通过max-width限制图片最大宽度，使页面不会被撑开。<br/><br/><br/>补充：原方案其实在正常情况下是正确的，IE6&#92;IE7&#92;FF&#92;Chrome都正确。正常情况是指处理的图片是同域下的图片。如果不同域即引用了其它站的图片，那么就会有我上面所描述的问题，即图片会变形。<br/>Tags - <a href="http://www.9enjoy.com/tags/css/" rel="tag">css</a> , <a href="http://www.9enjoy.com/tags/%25E5%259B%25BE%25E7%2589%2587/" rel="tag">图片</a>
]]>
</description>
</item><item>
<link>http://www.9enjoy.com/post/367/</link>
<title><![CDATA[FCKeditor粘贴Word时弹出窗口的取消]]></title> 
<author>enjoy &lt;&gt;</author>
<category><![CDATA[HTML+CSS+JS]]></category>
<pubDate>Tue, 09 Jun 2009 13:06:46 +0000</pubDate> 
<guid>http://www.9enjoy.com/post/367/</guid> 
<description>
<![CDATA[ 
	<br/>用fckeditor做为用户发布的编辑框，允许用户发布Word。默认的情况下，粘取进word时，提示是否清除word样式，选择&quot;是&quot;则弹出一个框，需要再粘贴一次来清除word样式。这个操作很麻烦，因此要取消。<br/><br/>开始找到的方法是把fckeditor&#92;editor&#92;js下的fckeditorcode_ie.js，查找PasteFromWord会找到以下内容:<br/>PasteFromWord:function()&#123;FCKDialog.OpenDialog(&#039;FCKDialog_Paste&#039;,FCKLang.PasteFromWord,&#039;dialog/fck_paste.html&#039;,400,330,&#039;Word&#039;);&#125;<br/>把它改为<br/>PasteFromWord:function()&#123;FCK.InsertHtml( clipboardData.getData(&quot;Text&quot;) );&#125;<br/>但这样，就变纯文本了，不行！<br/><br/>搜索了好久没找到有效方法，最终参考<a href="http://blog.csdn.net/yeahugo/archive/2008/06/04/2512386.aspx" target="_blank">http://blog.csdn.net/yeahugo/archive/2008/06/04/2512386.aspx</a>的方法，几经测试，终于实现了。<br/><br/>由于JS什么的会自动缓存，每次测试，还要清除临时文件再刷新页面才行，真麻烦啊！<br/><br/>具体操作如下：<br/>打开fckeditor&#92;editor&#92;js下的fckeditorcode_ie.js，<br/>找到if (confirm(FCKLang.PasteWordConfirm))那条，改为：<br/>if (confirm(FCKLang.PasteWordConfirm))&#123;var D=A;D=CleanWord(D,true,true);FCK.InsertHtml(D);return false;&#125;<br/>打开dialog&#92;fck_paste.html，把里面的CleanWord函数粘贴到头部。<br/><br/><br/>这时再粘贴Word时，选择是后，就会直接清除格式。如果不要是否的提示，把confirm(FCKLang.PasteWordConfirm)的判断去掉就可以了。<br/>Tags - <a href="http://www.9enjoy.com/tags/word/" rel="tag">word</a> , <a href="http://www.9enjoy.com/tags/js/" rel="tag">js</a>
]]>
</description>
</item><item>
<link>http://www.9enjoy.com/post/311/</link>
<title><![CDATA[提交表单内容返回后保留填写的内容]]></title> 
<author>enjoy &lt;&gt;</author>
<category><![CDATA[HTML+CSS+JS]]></category>
<pubDate>Mon, 06 Oct 2008 02:54:28 +0000</pubDate> 
<guid>http://www.9enjoy.com/post/311/</guid> 
<description>
<![CDATA[ 
	在填好一个表单内容，提交后，如果发现错误输入，则用window.history.back()返回上一页，但是返回上一页后如何保存用户填写的内容呢？让用户重新填写一边显然不是好办法。<br/><br/>研究了下，发现需要使用下面的代码：<br/><br/>head中增加：<br/>&lt;meta name=&quot;save&quot; content=&quot;history&quot;&gt;<br/>CSS中增加：<br/>.saveHistory&nbsp;&nbsp;&#123;behavior:url(#default#savehistory);&#125;&nbsp;&nbsp;<br/>在需要保留填写的input处，加上saveHistory样式，如：<br/>&lt;input type=&quot;text&quot; name=&quot;username&quot; size=&quot;25&quot; maxlength=&quot;15&quot; id=&quot;username&quot; class=&quot;saveHistory&quot;&gt;<br/>如果已经有一个样式，则附加上：<br/>&lt;input type=&quot;text&quot; name=&quot;username&quot; size=&quot;25&quot; maxlength=&quot;15&quot; id=&quot;username&quot; onBlur=&quot;checkusername()&quot; class=&quot;text saveHistory&quot;&gt;<br/><br/>测试代码：<div class="code">&lt;HTML&gt;&lt;HEAD&gt;<br/>&lt;META content=history name=save&gt;<br/>&lt;STYLE&gt;<br/>.saveHistory &#123;behavior:url(#default#savehistory);&#125;<br/>&lt;/STYLE&gt;<br/>&lt;/HEAD&gt;<br/>&lt;BODY&gt;加了历史保留功能:&lt;BR&gt;&lt;TEXTAREA class=saveHistory&gt;&lt;/TEXTAREA&gt;&lt;BR&gt;没有加的:&lt;BR&gt;&lt;TEXTAREA&gt;&lt;/TEXTAREA&gt;<br/>&lt;P&gt;&lt;INPUT onclick=&#039;javascript:location.href=&quot;http://www.google.com&quot;&#039; type=button value=点击进入,再按后退键试试？&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</div><br/><br/>在IE和gg浏览器下测试OK，但在Firefox下无效。<br/><br/><br/>Tags - <a href="http://www.9enjoy.com/tags/%25E8%25A1%25A8%25E5%258D%2595/" rel="tag">表单</a>
]]>
</description>
</item><item>
<link>http://www.9enjoy.com/post/280/</link>
<title><![CDATA[网站黑白界面的快速实现代码]]></title> 
<author>enjoy &lt;&gt;</author>
<category><![CDATA[HTML+CSS+JS]]></category>
<pubDate>Mon, 19 May 2008 03:01:53 +0000</pubDate> 
<guid>http://www.9enjoy.com/post/280/</guid> 
<description>
<![CDATA[ 
	<div class="quote"><div class="quote-title">引用</div><div class="quote-content">网络处通知：国务院决定，5月19日至21日举行全国哀悼日。现将有关要求通知如下：<br/>一、各网站要及时、突出、滚动宣传报道国务院的公告，及时、突出报道党中央、国务院和我省举行的哀悼活动。有关网站在做好网上宣传报道的同时，要充分利用手机短信、彩信、手机报等形式做好报道。国务院公告在全国哀悼日期间刊登在各网站首页突出位置。<br/>二、各网站停止三天各类娱乐活动和服务。从19日零时起至21日24时，各游戏网站、各网站游戏频道一律关闭；各网站的娱乐频道和娱乐性音视频栏目一律用哀悼页面覆盖，相关栏目下的其他网页不得开放；各网站的娱乐论坛一律关闭；各搜索引擎的音乐和娱乐视频搜索功能一律关闭；各网站带有娱乐性的广告一律关闭。<br/>三、组织好网上哀悼活动。各网站的网上氛围应与举国哀悼相适应。各重点新闻网站和主要商业网站要组织好由网民参与的网上哀悼活动，要全面反映广大网民的悲痛之情、爱国之心。<br/>四、切实做好网上舆论管理工作。实行24小时值班，负责人在岗带班。<br/>五、切实抓好落实。要立即行动起来，将上述要求传达到各新闻网站、各商业网站、各政府网站，并动员一切力量在网上检查落实情况。<br/>六、严肃纪律。对相关工作落实不到位的地方和网站，将作出严肃处理。对不服从要求的网站，一律作关闭处理，并将在事后追究责任。&nbsp;&nbsp;</div></div><br/><br/><br/>今天早上打开一看，几乎所有大站，全部变成黑白界面。开始以为需要更改CSS的字体颜色，后来看到有人流传了代码，原来是使用了CSS的filter功能。<br/><br/>在CSS中加如下代码，均测试有效。<br/>html &#123;filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); &#125;<br/>或<br/>html &#123;filter:gray&#125;&nbsp;&nbsp;<br/><br/>显然，后者html &#123;filter:gray&#125; 较简单，我都是用这个代码来实现的。<br/><br/>@@080520@@update@@，据观察，使用此代码后，由于此filter效果需要客户端来处理这个效果，因此可能会导致配置较老的电脑的CPU占用率略微提高。<br/>Tags - <a href="http://www.9enjoy.com/tags/css/" rel="tag">css</a> , <a href="http://www.9enjoy.com/tags/filter/" rel="tag">filter</a>
]]>
</description>
</item><item>
<link>http://www.9enjoy.com/post/276/</link>
<title><![CDATA[整天对着电脑，一个保护眼睛的方法]]></title> 
<author>enjoy &lt;&gt;</author>
<category><![CDATA[HTML+CSS+JS]]></category>
<pubDate>Mon, 05 May 2008 11:49:38 +0000</pubDate> 
<guid>http://www.9enjoy.com/post/276/</guid> 
<description>
<![CDATA[ 
	<div class="quote"><div class="quote-title">引用</div><div class="quote-content">告诉大家一种保护眼睛的好方法：&nbsp;&nbsp;桌面-&gt;右键-&gt;属性-&gt;外观-&gt;高级－&gt;项目选择（窗口）、颜色1（L）选择（其它）将色调改为：85。饱和度：123。亮度：205－&gt;添加到自定义颜色－&gt;在自定义颜色选定点确定－&gt;确定这样所有的文档都不再是刺眼的白底黑字，而是非常柔和的豆沙绿色，这个色调是眼科专家配置的，长时间使用会很有效的缓解眼睛疲劳保护眼睛&nbsp;&nbsp;别忘了分享给你们的好朋友!!</div></div><br/><br/>试了下，还行！<br/>就是发现，许多网页(应该是白色底色)的底色不是白色了，变成我设置的绿色。包括许多大站都没有注意到这个细节。<br/>看来，以后要白色底色的话，要在CSS的body中加上 background:#FFF 的选项。<br/>Tags - <a href="http://www.9enjoy.com/tags/%25E7%259C%25BC%25E7%259D%259B/" rel="tag">眼睛</a> , <a href="http://www.9enjoy.com/tags/css/" rel="tag">css</a>
]]>
</description>
</item>
</channel>
</rss>