<?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>网站用户体验整合设计</title><link>http://www.zhangmeigong.cn/</link><description>张明工作室</description><generator>RainbowSoft Studio Z-Blog 1.8 Spirit Build 80605</generator><language>zh-CN</language><copyright>Copyright zhangming WebSite. Some Rights Reserved.</copyright><pubDate>Mon, 18 Jul 2011 10:47:03 +0800</pubDate><item><title>通讯录交互稿</title><author>a@b.com (张美工)</author><link>http://www.zhangmeigong.cn/post/219.html</link><pubDate>Mon, 18 Jul 2011 10:22:13 +0800</pubDate><guid>http://www.zhangmeigong.cn/post/219.html</guid><description><![CDATA[<p>&nbsp;</p><div><b>通讯录名片交互稿：</b></div><div>&nbsp;</div><div style="text-indent: -18pt; margin: 0cm 0cm 0pt 18pt"><span>1.<span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>联系人卡片：</div><p>&nbsp;</p><p><img title="" alt="" onload="ResizeImage(this,520)" src="http://www.zhangmeigong.cn/upload/2011/7/未标题-1拷贝.jpg" /><img title="" alt="" onload="ResizeImage(this,520)" src="http://www.zhangmeigong.cn/upload/2011/7/未标题-111拷贝.jpg" /></p><p>&nbsp;</p><div><b>2.</b><b>新建联系人名片：（点击功能icon</b><b>直接发起操作，若该文本框为空，则点击icon</b><b>后自动focus</b><b>到当前文本框）</b></div><p>&nbsp;<img alt="" src="http://www.zhangmeigong.cn/upload/2011/7/未标题-2拷贝.jpg" /></p><p><strong><span style="font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-size: 10.5pt; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA" lang="EN-US">3.</span><span style="font-family: 宋体; font-size: 10.5pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-bidi-font-family: Calibri">联系人名片（所添加字段按顺序自动排位，即<span style="color: red">添加字段不一定都排到最后</span>，而是会按该字段的排位自动嵌入相应的位置，并自动被</span><span style="font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-size: 10.5pt; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA" lang="EN-US">focus</span><span style="font-family: 宋体; font-size: 10.5pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-bidi-font-family: Calibri">）：</span></strong></p><p><strong><span style="font-family: 宋体; font-size: 10.5pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-bidi-font-family: Calibri"><img alt="" src="http://www.zhangmeigong.cn/upload/2011/7/未标题-31拷贝.jpg" /></span></strong></p><p><strong><span style="font-family: 宋体; font-size: 10.5pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-bidi-font-family: Calibri"><img alt="" src="http://www.zhangmeigong.cn/upload/2011/7/4.jpg" /></span></strong></p><p><span lang="EN-US"><font face="Calibri">4.</font><strong><font face="Calibri">我的</font></strong></span><span style="font-family: 宋体"><strong><span style="font-family: 宋体; font-size: 10.5pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-bidi-font-family: Calibri">名片：</span></strong></span></p><p><span style="font-family: 宋体"><strong><span style="font-family: 宋体; font-size: 10.5pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-bidi-font-family: Calibri"><img alt="" src="http://www.zhangmeigong.cn/upload/2011/7/txl3.jpg" /></span></strong></span></p><p><span style="font-family: 宋体"><strong><span style="font-family: 宋体; font-size: 10.5pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-bidi-font-family: Calibri"><img alt="" src="http://www.zhangmeigong.cn/upload/2011/7/txl2.jpg" /></span></strong></span></p>]]></description><category>用户体验</category><comments>http://www.zhangmeigong.cn/post/219.html#comment</comments><wfw:comment>http://www.zhangmeigong.cn/</wfw:comment><wfw:commentRss>http://www.zhangmeigong.cn/feed.asp?cmt=219</wfw:commentRss><trackback:ping>http://www.zhangmeigong.cn/cmd.asp?act=tb&amp;id=219&amp;key=a453d720</trackback:ping></item><item><title>通讯录交互稿</title><author>a@b.com (张美工)</author><link>http://www.zhangmeigong.cn/post/220.html</link><pubDate>Mon, 18 Jul 2011 10:22:13 +0800</pubDate><guid>http://www.zhangmeigong.cn/post/220.html</guid><description><![CDATA[<p>&nbsp;</p><div><b>通讯录名片交互稿：</b></div><div>&nbsp;</div><div style="text-indent: -18pt; margin: 0cm 0cm 0pt 18pt"><span>1.<span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>联系人卡片：</div><p>&nbsp;</p><p><img onload="ResizeImage(this,520)" title="" alt="" src="http://www.zhangmeigong.cn/upload/2011/7/未标题-1拷贝.jpg" /><img onload="ResizeImage(this,520)" title="" alt="" src="http://www.zhangmeigong.cn/upload/2011/7/未标题-111拷贝.jpg" /></p><p>&nbsp;</p><div><b>2.</b><b>新建联系人名片：（点击功能icon</b><b>直接发起操作，若该文本框为空，则点击icon</b><b>后自动focus</b><b>到当前文本框）</b></div><p>&nbsp;</p><p><strong><span style="font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-size: 10.5pt; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA" lang="EN-US">3.</span><span style="font-family: 宋体; font-size: 10.5pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-bidi-font-family: Calibri">联系人名片（所添加字段按顺序自动排位，即<span style="color: red">添加字段不一定都排到最后</span>，而是会按该字段的排位自动嵌入相应的位置，并自动被</span><span style="font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-size: 10.5pt; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA" lang="EN-US">focus</span><span style="font-family: 宋体; font-size: 10.5pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-bidi-font-family: Calibri">）：</span></strong></p><p><span lang="EN-US"><font face="Calibri">4.</font><strong><font face="Calibri">我的</font></strong></span><span style="font-family: 宋体"><strong><span style="font-family: 宋体; font-size: 10.5pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-bidi-font-family: Calibri">名片：</span></strong></span></p>]]></description><category>用户体验</category><comments>http://www.zhangmeigong.cn/post/220.html#comment</comments><wfw:comment>http://www.zhangmeigong.cn/</wfw:comment><wfw:commentRss>http://www.zhangmeigong.cn/feed.asp?cmt=220</wfw:commentRss><trackback:ping>http://www.zhangmeigong.cn/cmd.asp?act=tb&amp;id=220&amp;key=2f63ae02</trackback:ping></item><item><title>用户体验工作</title><author>a@b.com (张美工)</author><link>http://www.zhangmeigong.cn/post/218.html</link><pubDate>Tue, 02 Nov 2010 11:11:15 +0800</pubDate><guid>http://www.zhangmeigong.cn/post/218.html</guid><description><![CDATA[<div style="font-size: 14px" id="blogDetailDiv"><p style="text-indent: 2em"><font color="#0099ff">就是当你有一个产品概念的时候，用户体验人员能够帮助你<span style="color: #000000"><strong>快速形成</strong>一个<strong>原形</strong></span>，比如说简单的可以直接在纸上面画两笔，复杂的可以是我们做成交互类小动画，或者交互类简单原形，这样可以请我们用户试用。从这个过程当中我们可以<span style="color: #000000"><strong>得到用户直接的反馈</strong></span>，这样就避免可能我要花两三个月开发一套系统，这个系统出来以后用户一用，发现有问题，不行。所以用户体验团队对大家最大的帮助，是帮助能够快速获得原形，快速获得反馈。</font></p><p style="text-indent: 2em"><font color="#0099ff">所以正是因为这个特点，实际上<span style="color: #000000"><strong>越早期投入</strong></span>用户体验，那么给整个产品带来的<span style="color: #000000"><strong>帮助越大</strong></span>。</font></p><p style="text-indent: 2em"><span style="color: #000000"><strong>用户体验的特点</strong></span><font color="#0099ff">是擅长于把一件事情能够从用户角度做好，能够快速形成原形，快速获得反馈，这样从流程上，从质量上都给大家有一个很好的提升。</font></p><p style="text-indent: 2em"><font color="#0099ff">当腾讯科技问一个好的<span style="color: #000000"><strong>用户体验工程</strong></span>师究竟该怎样才能<span style="color: #000000"><strong>练成</strong></span>，吴卓浩建议如下：</font></p><p style="text-indent: 2em"><font color="#0099ff">其一，以抓住<span style="color: #000000"><strong>用户根本需求</strong></span>作为<span style="color: #000000">突破口</span>。&ldquo;任何时候都不要迷失在功能、技术或者设计的细节当中。所有的最成功的创新产品，全部都是抓住了用户的根本需求，它也许并没有去创造一个新的需求，并没有创造全新的产品，但是它重新定义了一个，重新发明了一个产品，满足了用户的根本需求。&rdquo;</font></p><p style="text-indent: 2em"><font color="#0099ff">其二，<span style="color: #000000"><strong>方法</strong></span>很重要，选择了正确的方法，就成功一半。</font></p><p style="text-indent: 2em"><font color="#0099ff">其三，要时刻记住，用户体验团队是<span style="color: #000000"><strong>帮助别人更成功</strong></span>。</font></p><p style="text-indent: 2em">&nbsp;</p><p style="text-indent: 2em">更多用户体验信息：<a href="http://tech.qq.com/a/20100901/000497.htm" target="_blank">http://tech.qq.com/a/20100901/000497.htm</a></p></div>]]></description><category>用户体验</category><comments>http://www.zhangmeigong.cn/post/218.html#comment</comments><wfw:comment>http://www.zhangmeigong.cn/</wfw:comment><wfw:commentRss>http://www.zhangmeigong.cn/feed.asp?cmt=218</wfw:commentRss><trackback:ping>http://www.zhangmeigong.cn/cmd.asp?act=tb&amp;id=218&amp;key=5cd63fe6</trackback:ping></item><item><title>Ext学习及应用经验小结</title><author>a@b.com (张美工)</author><link>http://www.zhangmeigong.cn/post/217.html</link><pubDate>Thu, 02 Sep 2010 15:29:23 +0800</pubDate><guid>http://www.zhangmeigong.cn/post/217.html</guid><description><![CDATA[<p><b>一、理解</b><b>Html DOM</b><b>、</b><b>Ext Element</b><b>及</b><b>Component </b><b>　　</b></p><div style="line-height: 150%"><span style="line-height: 150%; font-size: 10.5pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="line-height: 150%; font-size: 10.5pt">要学习及应用好</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">框架，需要理解</span><span style="line-height: 150%; font-size: 10.5pt">Html DOM</span><span style="line-height: 150%; font-size: 10.5pt">、</span><span style="line-height: 150%; font-size: 10.5pt">Ext Element</span><span style="line-height: 150%; font-size: 10.5pt">及</span><span style="line-height: 150%; font-size: 10.5pt">Component</span><span style="line-height: 150%; font-size: 10.5pt">三者的区别。</span><span style="line-height: 150%; font-size: 10.5pt"><br /></span><span style="line-height: 150%; font-size: 10.5pt">　　</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">是基于</span><span style="line-height: 150%; font-size: 10.5pt">Web</span><span style="line-height: 150%; font-size: 10.5pt">的富客户端框架，其完全是基于标准</span><span style="line-height: 150%; font-size: 10.5pt">W3C</span><span style="line-height: 150%; font-size: 10.5pt">技术构建设的，使用到的都是</span><span style="line-height: 150%; font-size: 10.5pt">HTML</span><span style="line-height: 150%; font-size: 10.5pt">、</span><span style="line-height: 150%; font-size: 10.5pt">CSS</span><span style="line-height: 150%; font-size: 10.5pt">、</span><span style="line-height: 150%; font-size: 10.5pt">DIV</span><span style="line-height: 150%; font-size: 10.5pt">等相关技术。</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">最杰出之处，是开发了一系列非常简单易用的控件及组件，我们只需要使用这些组件就能实现各种丰富多彩的</span><span style="line-height: 150%; font-size: 10.5pt">UI</span><span style="line-height: 150%; font-size: 10.5pt">的开发。</span><span style="line-height: 150%; font-size: 10.5pt">　　无论组件有多少配置属性、还是事件、方法等等，其最终都会转化为</span><span style="line-height: 150%; font-size: 10.5pt">HTML</span><span style="line-height: 150%; font-size: 10.5pt">在浏览器上显示出来，而每一个</span><span style="line-height: 150%; font-size: 10.5pt">HTML</span><span style="line-height: 150%; font-size: 10.5pt">页面都有一个层次分明的</span><span style="line-height: 150%; font-size: 10.5pt">DOM</span><span style="line-height: 150%; font-size: 10.5pt">树模型，浏览器中的所有内容都有相应的</span><span style="line-height: 150%; font-size: 10.5pt">DOM</span><span style="line-height: 150%; font-size: 10.5pt">对象，动态改变页面的内容，正是通过使用脚本语言来操作</span><span style="line-height: 150%; font-size: 10.5pt">DOM</span><span style="line-height: 150%; font-size: 10.5pt">对象实现。</span></div><div style="line-height: 150%"><span style="line-height: 150%; font-size: 10.5pt">&nbsp;</span><span style="line-height: 150%; font-size: 10.5pt">　仅仅有</span><span style="line-height: 150%; font-size: 10.5pt">DOM</span><span style="line-height: 150%; font-size: 10.5pt">是不够的，比如要把页面中的某一个节点移到其它位置，要给某一个节点添加阴影效果，要隐藏或显示某一个节点等，我们都需要通过几句</span><span style="line-height: 150%; font-size: 10.5pt"> javascript</span><span style="line-height: 150%; font-size: 10.5pt">才能完成。因此，</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">在</span><span style="line-height: 150%; font-size: 10.5pt">DOM</span><span style="line-height: 150%; font-size: 10.5pt">的基础上，创建了</span><span style="line-height: 150%; font-size: 10.5pt">Ext Element</span><span style="line-height: 150%; font-size: 10.5pt">，可以使用</span><span style="line-height: 150%; font-size: 10.5pt">Element</span><span style="line-height: 150%; font-size: 10.5pt">来包装任何</span><span style="line-height: 150%; font-size: 10.5pt">DOM</span><span style="line-height: 150%; font-size: 10.5pt">，</span><span style="line-height: 150%; font-size: 10.5pt">Element</span><span style="line-height: 150%; font-size: 10.5pt">对象中添加了一系列快捷、简便的实用方法。</span><span style="line-height: 150%; font-size: 10.5pt">　　对于终端用户来说，仅仅有</span><span style="line-height: 150%; font-size: 10.5pt">Element</span><span style="line-height: 150%; font-size: 10.5pt">是不够的，比如用户要显示一个表格、要显示一棵树、要显示一个弹出窗口等。因此，除了</span><span style="line-height: 150%; font-size: 10.5pt">Element</span><span style="line-height: 150%; font-size: 10.5pt">以外，</span><span style="line-height: 150%; font-size: 10.5pt">Ext </span><span style="line-height: 150%; font-size: 10.5pt">还建立了一系列的客户端界面组件</span><span style="line-height: 150%; font-size: 10.5pt">Component</span><span style="line-height: 150%; font-size: 10.5pt">，我们在编程时，只要使用这些组件</span><span style="line-height: 150%; font-size: 10.5pt">Componet</span><span style="line-height: 150%; font-size: 10.5pt">即可实现相关数据展示及交互等，而</span><span style="line-height: 150%; font-size: 10.5pt"> Component</span><span style="line-height: 150%; font-size: 10.5pt">是较高层次的抽象，每一个组件在渲染</span><span style="line-height: 150%; font-size: 10.5pt">render</span><span style="line-height: 150%; font-size: 10.5pt">的时候，都会依次通过</span><span style="line-height: 150%; font-size: 10.5pt">Element</span><span style="line-height: 150%; font-size: 10.5pt">、</span><span style="line-height: 150%; font-size: 10.5pt">DOM</span><span style="line-height: 150%; font-size: 10.5pt">来生成最终的页面效果。</span></div><div style="line-height: 18pt; background: #fafafa">&nbsp;　　在使用Ext开发的应用程序中，组件Component是最高层次的抽象，是直接给用户使用的，Ext Element是Ext的底层API，主要是由Ext或自定义组件调用的，而DOM是W3C标准定义的原始API，Ext的Element通过操作DOM 来实现页面的效果显示。 　　在Ext中，组件渲染以后可以通过访问组件的el属性来得到组件对应的Element，通过访问Element的dom属性可以得到其下面的DOM对象。另外，我们可以通过通过Ext类的快捷方法getCmp、get、getDom等方法来得组件Component、Ext元素Element及DOM节点。<b><span style="letter-spacing: 0.4pt; color: green; font-size: 12pt">比如：</span></b></div><div style="text-align: left; line-height: 18pt; background: #fafafa" align="left"><span style="letter-spacing: 0.4pt; font-size: 12pt">　　var view=new Ext.Viewport();<span style="color: green">//</span><span style="color: green">创建了一个组件Component </span></span></div><div style="text-align: left; line-height: 18pt; background: #fafafa" align="left"><span style="letter-spacing: 0.4pt; font-size: 12pt">　　view.el.setOpacity(.5);<span style="color: green">//</span><span style="color: green">调用Element的setOpacity方法 </span></span></div><div style="text-align: left; line-height: 18pt; background: #fafafa" align="left"><span style="letter-spacing: 0.4pt; font-size: 12pt">　　view.el.dom.innerHTML=&quot;Hello Ext&quot;;<span style="color: green">//</span><span style="color: green">通过Element的dom属性操作DOM对象 </span></span></div><div style="text-align: left; line-height: 18pt; background: #fafafa" align="left"><span style="letter-spacing: 0.4pt; font-size: 12pt">　<b><span style="color: green">　再看下面的代码： </span></b></span></div><div style="text-align: left; line-height: 18pt; background: #fafafa" align="left"><span style="letter-spacing: 0.4pt; font-size: 12pt">　　var win=new Ext.Window({id:&quot;win1&quot;,title:&quot;我的窗口&quot;,width:200,height:200}); </span></div><div style="text-align: left; line-height: 18pt; background: #fafafa" align="left"><span style="letter-spacing: 0.4pt; font-size: 12pt">　　win.show(); </span></div><div style="text-align: left; line-height: 18pt; background: #fafafa" align="left"><span style="letter-spacing: 0.4pt; font-size: 12pt">　　var c=Ext.getCmp(&quot;win1&quot;);<span style="color: green">//</span><span style="color: green">得到组件win </span></span></div><div style="text-align: left; line-height: 18pt; background: #fafafa" align="left"><span style="letter-spacing: 0.4pt; font-size: 12pt">　　var e=Ext.get(&quot;win1&quot;);<span style="color: green">//</span><span style="color: green">根据id得到组件win相应的Element </span></span></div><div style="line-height: 150%; text-indent: 26.25pt; margin-left: 21pt"><span style="letter-spacing: 0.4pt">var dom=Ext.getDom(&quot;win1&quot;);<span style="color: green">//</span></span><span style="letter-spacing: 0.4pt; color: green">得到id为win1的DOM节点</span></div><div style="line-height: 150%; margin-left: 21pt"><b>二、熟悉</b><b>ext</b><b>组件体系</b></div><div style="line-height: 150%; text-indent: 21pt; margin-left: 21pt"><span style="line-height: 150%; font-size: 10.5pt">Ext2.0</span><span style="line-height: 150%; font-size: 10.5pt">对整个框架进行了重构，最为杰出的是推出了一个以</span><span style="line-height: 150%; font-size: 10.5pt">Component</span><span style="line-height: 150%; font-size: 10.5pt">类为基础的组件体系，在</span><span style="line-height: 150%; font-size: 10.5pt">Component</span><span style="line-height: 150%; font-size: 10.5pt">类基础上，使用面向对象的方法，设计了一系列的组件及控件。因此，要能游刃有余地使用</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">，熟悉</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">组件体系是最基本的。</span></div><div style="line-height: 150%; text-indent: 21pt; margin-left: 21pt"><span style="line-height: 150%; font-size: 10.5pt">&nbsp;</span><span style="line-height: 150%; font-size: 10.5pt">　　在《</span><span style="line-height: 150%; font-size: 10.5pt">ExtJS</span><span style="line-height: 150%; font-size: 10.5pt">实用开发指南》中，有如下面一幅组件图：</span></div><div style="line-height: 150%; text-indent: 21pt; margin-left: 21pt"><span style="line-height: 150%; font-size: 10.5pt">&nbsp;</span><span style="line-height: 150%; font-size: 10.5pt">　　通过组件结构图我们可以一目了然的看出整个</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">组件继承及组成体系，当使用一个组件的时间，了解他的继承体系，这样可以便于我们掌握组件的各种特性。</span><span style="line-height: 150%; font-size: 10.5pt">　　</span><b>三、掌握核心控件</b></div><div style="line-height: 150%; text-indent: 21pt; margin-left: 21pt"><span style="line-height: 150%; font-size: 10.5pt">控件其实也是组件，比如用于显示树信息的</span><span style="line-height: 150%; font-size: 10.5pt">TreePanel</span><span style="line-height: 150%; font-size: 10.5pt">、用于显示表格的</span><span style="line-height: 150%; font-size: 10.5pt">GridPanel</span><span style="line-height: 150%; font-size: 10.5pt">及</span><span style="line-height: 150%; font-size: 10.5pt">EditorGridPanel</span><span style="line-height: 150%; font-size: 10.5pt">，还有代表应用程序窗口的</span><span style="line-height: 150%; font-size: 10.5pt">Ext.Window</span><span style="line-height: 150%; font-size: 10.5pt">等都属于</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">控件。在使用</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">的时候，一定要掌握一些核心控件，特别是处于基类的控件。比如上面提到的几个控件，他们都是继承于面板</span><span style="line-height: 150%; font-size: 10.5pt">Panel</span><span style="line-height: 150%; font-size: 10.5pt">，所以我们要重点掌握面板这个核心控件的特性。比如面板由以下几个部分组成：一个顶部工具栏</span><span style="line-height: 150%; font-size: 10.5pt">(tbar)</span><span style="line-height: 150%; font-size: 10.5pt">、一个底部工具栏</span><span style="line-height: 150%; font-size: 10.5pt">(bbar)</span><span style="line-height: 150%; font-size: 10.5pt">、面板头部</span><span style="line-height: 150%; font-size: 10.5pt">(header)</span><span style="line-height: 150%; font-size: 10.5pt">、面板尾部</span><span style="line-height: 150%; font-size: 10.5pt">(bottom)</span><span style="line-height: 150%; font-size: 10.5pt">、面板主区域</span><span style="line-height: 150%; font-size: 10.5pt">(body)</span><span style="line-height: 150%; font-size: 10.5pt">几个部分组成。面板类中还内置了面板展开、关闭等功能，并提供一系列可重用的工具按钮使得我们可以轻松实现自定义的行为，面板可以放入其它任何容器中，面板本身是一个容器，他里面又可以包含各种其它组件。只要掌握了</span><span style="line-height: 150%; font-size: 10.5pt">Panel</span><span style="line-height: 150%; font-size: 10.5pt">的应用，那么学习</span><span style="line-height: 150%; font-size: 10.5pt">TreePanel</span><span style="line-height: 150%; font-size: 10.5pt">、</span><span style="line-height: 150%; font-size: 10.5pt">Window</span><span style="line-height: 150%; font-size: 10.5pt">等就会变得简单得多。</span><span style="line-height: 150%; font-size: 10.5pt"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="line-height: 150%; font-size: 10.5pt">同样的道理，对于</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">的表单字段来说，不管是</span><span style="line-height: 150%; font-size: 10.5pt">ComboBox</span><span style="line-height: 150%; font-size: 10.5pt">，</span><span style="line-height: 150%; font-size: 10.5pt">NumberField</span><span style="line-height: 150%; font-size: 10.5pt">、还是</span><span style="line-height: 150%; font-size: 10.5pt">DateField</span><span style="line-height: 150%; font-size: 10.5pt">，他们其它都是</span><span style="line-height: 150%; font-size: 10.5pt"> Ext.form.Field</span><span style="line-height: 150%; font-size: 10.5pt">类的子类，在他上面定义了表单字段的各种基本操作及特性。在学习使用表单字段组件时，一定要重点研究</span><span style="line-height: 150%; font-size: 10.5pt">Field</span><span style="line-height: 150%; font-size: 10.5pt">这个类，掌握他的主要方法、事件等，就能有助于更好的学习使用其它的字段。</span></div><div style="line-height: 150%; margin-left: 21pt"><b>四、学习及研究示例</b></div><div style="line-height: 150%; text-indent: 21pt; margin-left: 21pt"><span style="line-height: 150%; font-size: 10.5pt">由于</span><span style="line-height: 150%; font-size: 10.5pt">javascript</span><span style="line-height: 150%; font-size: 10.5pt">语言非常灵活，不像静态强类型语言（比如</span><span style="line-height: 150%; font-size: 10.5pt">Java</span><span style="line-height: 150%; font-size: 10.5pt">）那样有固定的代码设计模式，而往往是不同的人就有不同的编程风格。在实际应用开发中，只有见多识广，才能在自己的在脑中建立一个开发库。</span></div><div style="line-height: 150%; text-indent: 21pt; margin-left: 21pt"><span style="line-height: 150%; font-size: 10.5pt">学习别人的示例对于我们开发帮助会非常大，示例包括基本组件的应用、综合应用等多个方面。在此，简单推荐几个。</span></div><div style="line-height: 150%; text-indent: 21pt; margin-left: 21pt"><span style="line-height: 150%; font-size: 10.5pt">１、</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">官方示例，在</span><span style="line-height: 150%; font-size: 10.5pt">ext</span><span style="line-height: 150%; font-size: 10.5pt">项目下载包的</span><span style="line-height: 150%; font-size: 10.5pt">examples</span><span style="line-height: 150%; font-size: 10.5pt">目录中，包括各个控件的基本应用演示，同时还有一些比较复杂的组合示例，有简有繁，非常适合初学者认真研究。</span></div><div style="line-height: 150%; text-indent: 21pt; margin-left: 21pt"><span style="line-height: 150%; font-size: 10.5pt">２、</span><span style="line-height: 150%; font-size: 10.5pt">Vifir</span><span style="line-height: 150%; font-size: 10.5pt">推出的示例，</span><span style="line-height: 150%; font-size: 10.5pt">Vifir</span><span style="line-height: 150%; font-size: 10.5pt">推出的一些示例主要包括两类，一种是开源的示例应用，另外一种是针对</span><span style="line-height: 150%; font-size: 10.5pt">VIP</span><span style="line-height: 150%; font-size: 10.5pt">用户的实用示例。开源的示例主要是指</span><span style="line-height: 150%; font-size: 10.5pt"> wlr</span><span style="line-height: 150%; font-size: 10.5pt">单用户</span><span style="line-height: 150%; font-size: 10.5pt">blog</span><span style="line-height: 150%; font-size: 10.5pt">系统，这个一个集合了前后台技术的</span><span style="line-height: 150%; font-size: 10.5pt">ext</span><span style="line-height: 150%; font-size: 10.5pt">综合示例，而针对</span><span style="line-height: 150%; font-size: 10.5pt">VIP</span><span style="line-height: 150%; font-size: 10.5pt">用户的实用示例则是可以作为开发骨架或扩展组件的示例。</span></div><div style="line-height: 150%; text-indent: 21pt; margin-left: 21pt"><span style="line-height: 150%; font-size: 10.5pt">３、其它示例，在</span><span style="line-height: 150%; font-size: 10.5pt">ext</span><span style="line-height: 150%; font-size: 10.5pt">社区中还有很多比较优秀的</span><span style="line-height: 150%; font-size: 10.5pt">ext</span><span style="line-height: 150%; font-size: 10.5pt">应用示例，有些只是一个应用演示，虽然没有提供源码下载，但我们可以直接下载引用的</span><span style="line-height: 150%; font-size: 10.5pt">js</span><span style="line-height: 150%; font-size: 10.5pt">文件来得到这些示例的</span><span style="line-height: 150%; font-size: 10.5pt">ext</span><span style="line-height: 150%; font-size: 10.5pt">应用代码，同样能取起到非常好的学习效果。</span></div><div style="line-height: 150%; margin-left: 21pt"><b>五、多运用</b></div><div style="line-height: 150%; margin-left: 21pt"><span style="line-height: 150%; font-size: 10.5pt">&nbsp;</span><span style="line-height: 150%; font-size: 10.5pt">　　</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">看起来是非常简单的东西，稍有点编程知识的人，按照《</span><span style="line-height: 150%; font-size: 10.5pt">ExtJS</span><span style="line-height: 150%; font-size: 10.5pt">实用开发指南》中的入门指南，半小时就能学会使用</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">。然而，当准备使用</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">开发一个项目时，却不知道从何处入手，或者是在使用</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">的时候，出了一点小问题自己不知道该如何解决。编程是一门实践性的科学，仅仅靠看书、看别人写的代码是远远不够的，因此，必须多做实践才行，只有通过不断的练习，大量的使用，才能对</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">的组件特性、事件、事件处理机制以及与服务器端交互接口等深入的掌握，只有多做运用，深入了解</span><span style="line-height: 150%; font-size: 10.5pt">ext</span><span style="line-height: 150%; font-size: 10.5pt">的组件的工作原理及机制，才能编写出高级的</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">的应用。</span></div><div style="line-height: 150%; margin-left: 21pt"><b>六、熟读</b><b>Ext</b><b>项目的源代码</b></div><div style="line-height: 150%; text-indent: 21pt; margin-left: 21pt"><span style="line-height: 150%; font-size: 10.5pt">如果要想深入应用</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">，那么阅读</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">项目的源代码这是必不可少的环节，</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">的代码质量非常高，通过阅读他的代码我们可以更加深刻的了解</span><span style="line-height: 150%; font-size: 10.5pt"> javascript</span><span style="line-height: 150%; font-size: 10.5pt">面向对象编程，</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">代码中包含了很多高级的</span><span style="line-height: 150%; font-size: 10.5pt">js</span><span style="line-height: 150%; font-size: 10.5pt">技巧以及设计模式。在使用</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">的过程中，我们经常根据项目的需要对</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">组件进行扩展，设计自己的组件或控件，而如何实现一个自定义的</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">组件，我们可以从</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">的各个组件源代码中找到答案。</span></div><div style="line-height: 150%; text-indent: 21pt; margin-left: 21pt"><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">的源代码在</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">项目的</span><span style="line-height: 150%; font-size: 10.5pt">source</span><span style="line-height: 150%; font-size: 10.5pt">目录。读</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">源码，并不一定非要从某一个地方开始，而组件核心代码</span><span style="line-height: 150%; font-size: 10.5pt">Component.js</span><span style="line-height: 150%; font-size: 10.5pt">、容器组件代码</span><span style="line-height: 150%; font-size: 10.5pt"> Container.js</span><span style="line-height: 150%; font-size: 10.5pt">、面板</span><span style="line-height: 150%; font-size: 10.5pt">Panel.js</span><span style="line-height: 150%; font-size: 10.5pt">等这些是必看的；</span><span style="line-height: 150%; font-size: 10.5pt"> core</span><span style="line-height: 150%; font-size: 10.5pt">目录中的</span><span style="line-height: 150%; font-size: 10.5pt">Element.js</span><span style="line-height: 150%; font-size: 10.5pt">、</span><span style="line-height: 150%; font-size: 10.5pt">Ext.js</span><span style="line-height: 150%; font-size: 10.5pt">等也是必看的。当需要从一个控件进行扩展的时候，最好能简单看一看这个控件的源代码。</span></div><div style="line-height: 150%; margin-left: 21pt"><b>七、理解，熟悉，掌握</b><b>Json </b><span style="line-height: 150%; font-size: 10.5pt">　</span></div><div style="line-height: 150%; text-indent: 21pt; margin-left: 21pt"><span style="line-height: 150%; font-size: 10.5pt">在项目中，</span><span style="line-height: 150%; font-size: 10.5pt">Ext</span><span style="line-height: 150%; font-size: 10.5pt">本身的华丽外表就很吸引眼球了，但这仅仅是其外在的美，还有最核心的内在美，即：</span><span style="line-height: 150%; font-size: 10.5pt">Json</span><span style="line-height: 150%; font-size: 10.5pt">。</span><span style="line-height: 150%; font-size: 10.5pt">Json(JavaScript Object Notation) </span><span style="line-height: 150%; font-size: 10.5pt">是一种数据交互格式，一个不能实现数据交互功能的项目是没有任何意义的，大多的</span><span style="line-height: 150%; font-size: 10.5pt">Ajax</span><span style="line-height: 150%; font-size: 10.5pt">框架的数据交互都基于</span><span style="line-height: 150%; font-size: 10.5pt">Json</span><span style="line-height: 150%; font-size: 10.5pt">，如：</span><span style="line-height: 150%; font-size: 10.5pt">jQuery</span><span style="line-height: 150%; font-size: 10.5pt">、</span><span style="line-height: 150%; font-size: 10.5pt">ExtJs</span><span style="line-height: 150%; font-size: 10.5pt">等。因此理解</span><span style="line-height: 150%; font-size: 10.5pt">Json</span><span style="line-height: 150%; font-size: 10.5pt">掌握</span><span style="line-height: 150%; font-size: 10.5pt">Json</span><span style="line-height: 150%; font-size: 10.5pt">并熟练运用是很重要的。以目前主流的开发语言为例，</span><span style="line-height: 150%; font-size: 10.5pt">.NET</span><span style="line-height: 150%; font-size: 10.5pt">已经把</span><span style="line-height: 150%; font-size: 10.5pt">Json</span><span style="line-height: 150%; font-size: 10.5pt">封装到类中，无需配置，直接与数据库交互，轻松的封装直接使用；</span><span style="line-height: 150%; font-size: 10.5pt">Java</span><span style="line-height: 150%; font-size: 10.5pt">就麻烦些，必须去下一个</span><span style="line-height: 150%; font-size: 10.5pt">Json</span><span style="line-height: 150%; font-size: 10.5pt">包，然后再做一些配置，才可以使用；</span><span style="line-height: 150%; font-size: 10.5pt">PHP</span><span style="line-height: 150%; font-size: 10.5pt">和</span><span style="line-height: 150%; font-size: 10.5pt">Java</span><span style="line-height: 150%; font-size: 10.5pt">差不多，也必须下载一个</span><span style="line-height: 150%; font-size: 10.5pt">Json</span><span style="line-height: 150%; font-size: 10.5pt">插件（和类相似），但是不用配置，直接封装使用。在实际的项目中，各自的取舍配置，都基于项目和需求，并不是每个项目（针对</span><span style="line-height: 150%; font-size: 10.5pt">WEB</span><span style="line-height: 150%; font-size: 10.5pt">）都一定要用到。但是，如果想在项目中用到此类的</span><span style="line-height: 150%; font-size: 10.5pt">Ajax</span><span style="line-height: 150%; font-size: 10.5pt">框架，</span><span style="line-height: 150%; font-size: 10.5pt">Json</span><span style="line-height: 150%; font-size: 10.5pt">的掌握又是必须的。</span></div><div style="line-height: 150%">&nbsp;</div>]]></description><category>css+div</category><comments>http://www.zhangmeigong.cn/post/217.html#comment</comments><wfw:comment>http://www.zhangmeigong.cn/</wfw:comment><wfw:commentRss>http://www.zhangmeigong.cn/feed.asp?cmt=217</wfw:commentRss><trackback:ping>http://www.zhangmeigong.cn/cmd.asp?act=tb&amp;id=217&amp;key=c7158f14</trackback:ping></item><item><title>IE6弹出层盖不住下拉菜单的解决方案 </title><author>a@b.com (张美工)</author><link>http://www.zhangmeigong.cn/post/216.html</link><pubDate>Mon, 23 Aug 2010 13:19:51 +0800</pubDate><guid>http://www.zhangmeigong.cn/post/216.html</guid><description><![CDATA[<div id="blog_text" class="cnt"><span class="cal"><div class="entrypost">&nbsp;</div></span><p class="text"><span style="color: #dc143c"><strong>方案 I :</strong></span><br /><br />使用iframe方式解决，如下例子<br /><br />&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%22%3E" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</a><br /><br />&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml%22" target="_blank">http://www.w3.org/1999/xhtml&quot;</a> &gt;<br /><br />&lt;head&gt;<br /><br />&lt;style type=&quot;text/css&quot;&gt;<br /><br />body {margin:0;padding:0;text-align:center;background-color:#eee;}&nbsp;&nbsp; <br /><br />#bd {margin:20px auto;padding:5px 20px 20px;border:1px solid #bbb;width:760px;background-color:#9CCE2E;}&nbsp;&nbsp; <br /><br />#popup {position:absolute;left: 443px;top:87px;}<br /><br />.layer{width:300px;height:100px;padding:10px;border: 1px solid blue;background-color:#fff; }&nbsp;&nbsp; <br /><br />#popup iframe{display:none;_display:block;position:absolute;top:0;left:0px;z-index:-1;filter:mask();width:320px;height:120px;} <br /><br />&lt;/style&gt;<br /><br />&lt;/head&gt;<br /><br />&lt;body&gt;<br /><br />&lt;div id=&quot;bd&quot;&gt; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;h1&gt;IE6下div遮盖select的解决方案&lt;/h1&gt; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;div&gt;&lt;label for=&quot;ddTest&quot;&gt;Test&lt;/label&gt; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;select id=&quot;ddTest&quot;&gt; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option&gt;&hellip;&lt;/option&gt; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option&gt;pick me&lt;/option&gt; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/select&gt; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt; <br /><br />&lt;/div&gt; <br /><br />&lt;div id=&quot;popup&quot;&gt;<br /><br />&lt;div class=&quot;layer&quot;&gt;Is the select element poking through? &lt;/div&gt; <br /><br />&lt;iframe&gt;&lt;/iframe&gt;<br /><br />&lt;/div&gt;<br /><br />&lt;/body&gt;<br /><br />&lt;/html&gt;<br /><br />注意绿色代码段。<br /><br />工作原理：iframe能盖住select下拉菜单。<br /><br />在弹出层增加iframe，并采用绝对定位，z-index:-1让iframe浮于弹出层下方；<br /><br />filter:mask();让iframe透明~<br /><br />display:none;_display:block;保证FF，IE7以上版本不受影响<br /><br />width,height值确保iframe大小跟弹出层大小相同<br /><br />注意事项：<br /><br />弹出层 最外层区域只设置定位样式（position，left，top,z-index...），避免设置风格显示样式(特别注意边框) 因为iframe在其内，当边线刚好和select框重叠，边线将被select覆盖，影响显示效果<br /><br />缺陷：需要根据弹出层大小不同，设置iframe大小，局限比较大。<br /><br />当弹出层为半透明时，被覆盖的下拉菜单消失 <br /><br /><span style="color: #dc143c"><strong>方案 II :</strong></span><br /><br /><br />改进思路： <br /><br />在有弹出层页面，增加一个&lt;iframe&gt;&lt;/iframe&gt;绝对层，处于主页面内容上方，弹出层下方。并且iframe层大小为窗口或网页的大小，覆盖主内容。 <br /><br />当页面弹出绝对层时，同时显示iframe层；绝对层隐藏，同时iframe也隐藏。 <br /><br />页面代码如下： <br /><br />&lt;form&gt; <br /><br />&nbsp;&nbsp; &lt;select&gt;&lt;option&gt;这里是主页面内容区的下拉菜单&lt;/option&gt;&lt;/select&gt; <br />&lt;/form&gt; <br />&lt;div id=&quot;PopupDiv&quot;&gt;这里是弹出层区域&lt;/div&gt; <br />&lt;iframe id=&quot;DivShim&quot; src=&quot;javascript:false;&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot;&gt; &lt;/iframe&gt; //这里是 iframe层 <br /><br />主要样式表如下： <br /><br />#PopupDiv{position:absolute;left:***;top:***;z-index:***;...display:none;} <br /><br />#DivShim{position:absolute;top:0;left:0px;filter:mask();display:none;} <br /><br />js代码如下： <br /><br />&lt;script&gt; <br /><br />&nbsp;&nbsp; function DivSetVisible(state) <br />&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp; var DivRef = document.getElementById('PopupDiv'); <br />&nbsp;&nbsp;&nbsp;&nbsp; var IfrRef = document.getElementById('DivShim'); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(state) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DivRef.style.display = &quot;block&quot;; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IfrRef.style.width = document.body.offsetWidth; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IfrRef.style.height = document.body.offsetHeight;&nbsp;&nbsp; <br /><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IfrRef.style.zIndex = DivRef.style.zIndex - 1; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IfrRef.style.display = &quot;block&quot;; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DivRef.style.display = &quot;none&quot;; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IfrRef.style.display = &quot;none&quot;; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp; } <br />&lt;/script&gt; <br /><br />其中state为逻辑值,当需要显示时,触发DivSetVisible(ture)函数; 当需要隐藏时,触发DivSetVisible(false); <br /><br />注意：脚本取属性值有问题，只能取标签里定义的样式，无法取到样式表里的值。 此问题在后面补充<br /><br /><span style="color: #dc143c"><strong>方案 III :</strong></span><br /><br />进一步优化： <br /><br />不采用整体主页面内容覆盖，而是使iframe层大小，位置等于弹出层大小和位置，并处于弹出层下方。 <br /><br />并使用getStyle函数取样式表里的属性值。 <br /><br />&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%22%3E" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</a> <br /><br />&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml%22" target="_blank">http://www.w3.org/1999/xhtml&quot;</a> &gt; <br /><br />&lt;head&gt; <br /><br />&lt;style type=&quot;text/css&quot;&gt; <br /><br />body{margin:0;padding:0;text-align:center;background-color:#eee;} <br /><br />#bd{margin:20px auto;padding:5px 20px 20px;border:1px solid #bbb;width:760px;background-color:#9CCE2E;} <br /><br />#popup{position:absolute;left:443px;top:80px;z-index:10;width:300px;height:100px;padding:10px;border:1px solid #333;background:#fff;display:none;} <br /><br />#DivShim{position:absolute;filter:mask();border:none;display:none;} <br /><br />&lt;/style&gt; <br /><br />&lt;/head&gt; <br /><br />&lt;body&gt; <br /><br />&lt;div id=&quot;bd&quot;&gt; <br /><br />&lt;h1&gt;IE6下div遮盖select的解决方案&lt;/h1&gt; <br /><br />&lt;div&gt;&lt;label for=&quot;ddTest&quot;&gt;Test&lt;/label&gt; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;select id=&quot;ddTest&quot;&gt; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;option&gt;&hellip;&lt;/option&gt; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;option&gt;pick me&lt;/option&gt; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;/select&gt; <br /><br />&lt;/div&gt; <br /><br />&lt;/div&gt; <br /><br />&lt;div id=&quot;popup&quot;&gt;Is the select element poking through?&lt;br/&gt;&lt;p &gt;关闭弹出层&lt;/p&gt;&lt;/div&gt; <br /><br />&lt;iframe id=&quot;DivShim&quot; src=&quot;javascript:;&quot; scrolling=&quot;no&quot;&gt; &lt;/iframe&gt; <br /><br />&lt;br/&gt;&lt;br/&gt; <br /><br />&lt;br/&gt;&lt;br/&gt; <br /><br />&lt;br/&gt;&lt;br/&gt; <br /><br />&lt;br/&gt;&lt;br/&gt; <br /><br />&lt;b &gt;打开弹出层&lt;/b&gt; <br /><br />&lt;b &gt;关闭弹出层&lt;/b&gt; <br /><br />&lt;script&gt; <br /><br />//触发显示隐藏方法 <br /><br />function DivSetVisible(idName,state) <br /><br />{ <br /><br />var DivRef = document.getElementById(idName); <br /><br />var IfrRef = document.getElementById('DivShim'); <br /><br />if(state){ <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; DivRef.style.display = &quot;block&quot;; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; IfrRef.style.display = &quot;block&quot;; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; IfrRef.style.width = DivRef.offsetWidth + &quot;px&quot;; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; IfrRef.style.height = DivRef.offsetHeight + &quot;px&quot;; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; IfrRef.style.top = getStyle(DivRef,&quot;top&quot;); <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; IfrRef.style.left = getStyle(DivRef,&quot;left&quot;); <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; IfrRef.style.zIndex = getStyle(DivRef,&quot;zIndex&quot;)-1; <br /><br />} <br /><br />else{ <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; DivRef.style.display = &quot;none&quot;; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; IfrRef.style.display = &quot;none&quot;; <br /><br />} <br /><br />} <br /><br />//取样式表里的属性值 方法 <br /><br />function getStyle(elem, name){ <br /><br />if (elem.style[name]) <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; return elem.style[name]; <br /><br />else if (elem.currentStyle) <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; return elem.currentStyle[name]; <br /><br />else if (window.getComputedStyle) <br /><br />&nbsp;&nbsp;&nbsp;&nbsp; return document.defaultView.getComputedStyle(elem,null).getPropertyValue(name); <br /><br />else return null; <br /><br />} <br /><br />&lt;/script&gt; <br /><br />&lt;/body&gt; <br /><br />&lt;/html&gt;</p></div>]]></description><category>css+div</category><comments>http://www.zhangmeigong.cn/post/216.html#comment</comments><wfw:comment>http://www.zhangmeigong.cn/</wfw:comment><wfw:commentRss>http://www.zhangmeigong.cn/feed.asp?cmt=216</wfw:commentRss><trackback:ping>http://www.zhangmeigong.cn/cmd.asp?act=tb&amp;id=216&amp;key=7d6edf51</trackback:ping></item><item><title>分享几种JS烟花</title><author>a@b.com (张美工)</author><link>http://www.zhangmeigong.cn/post/215.html</link><pubDate>Wed, 04 Aug 2010 14:24:45 +0800</pubDate><guid>http://www.zhangmeigong.cn/post/215.html</guid><description><![CDATA[<p>蓝色理想发了自己写的烟花效果，弄的心里痒痒，自己也想写一个出来玩，结果把IE写死好几次，还是放弃了，这里转几个别人写的效果上来分享</p><p><br />&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&quot;&gt;<br />&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&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;title&gt;firework - Zehee&lt;/title&gt;<br />&lt;script type=&quot;text/javascript&quot;&gt;<br />var fireworks = function(){<br />&nbsp;this.size = 20;<br />&nbsp;this.rise();<br />}<br />fireworks.prototype = {<br />&nbsp;color:function(){<br />&nbsp;&nbsp;var c = ['0','3','6','9','c','f'];<br />&nbsp;&nbsp;var t = [c[Math.floor(Math.random()*100)%6],'0','f'];<br />&nbsp;&nbsp;t.sort(function(){return Math.random()&gt;0.5?-1:1;});<br />&nbsp;&nbsp;return '#'+t.join('');<br />&nbsp;},<br />&nbsp;aheight:function(){<br />&nbsp;&nbsp;var h = document.documentElement.clientHeight-250;<br />&nbsp;&nbsp;return Math.abs(Math.floor(Math.random()*h-200))+201;<br />&nbsp;},<br />&nbsp;firecracker:function(){<br />&nbsp;&nbsp;var b = document.createElement('div');<br />&nbsp;&nbsp;var w = document.documentElement.clientWidth;<br />&nbsp;&nbsp;b.style.position = 'absolute';<br />&nbsp;&nbsp;b.style.color = this.color();<br />&nbsp;&nbsp;b.style.bottom = 0;<br />&nbsp;&nbsp;b.style.left = Math.floor(Math.random()*w)+1+'px';<br />&nbsp;&nbsp;document.body.appendChild(b);<br />&nbsp;&nbsp;return b;<br />&nbsp;},<br />&nbsp;rise:function(){<br />&nbsp;&nbsp;var o = this.firecracker();<br />&nbsp;&nbsp;var n = this.aheight();<br />&nbsp;&nbsp;var c = this.color;<br />&nbsp;&nbsp;var e = this.expl;<br />&nbsp;&nbsp;var s = this.size;<br />&nbsp;&nbsp;var k = n;<br />&nbsp;&nbsp;var m = function(){<br />&nbsp;&nbsp;&nbsp;o.style.bottom = parseFloat(o.style.bottom)+k*0.1+'px';<br />&nbsp;&nbsp;&nbsp;k-=k*0.1;<br />&nbsp;&nbsp;&nbsp;if(k&lt;2){<br />&nbsp;&nbsp;&nbsp;&nbsp;clearInterval(clear);<br />&nbsp;&nbsp;&nbsp;&nbsp;e(o,n,s,c);<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;o.innerHTML = '.';<br />&nbsp;&nbsp;if(parseInt(o.style.bottom)&lt;n){<br />&nbsp;&nbsp;&nbsp;var clear = setInterval(m,20);<br />&nbsp;&nbsp;}<br />&nbsp;},<br />&nbsp;expl:function(o,n,s,c){<br />&nbsp;&nbsp;var R=n/3,Ri=n/6,Rii=n/9;<br />&nbsp;&nbsp;var r=0,ri=0,rii=0;<br />&nbsp;&nbsp;for(var i=0;i&lt;s;i++){<br />&nbsp;&nbsp;&nbsp;var span = document.createElement('span');<br />&nbsp;&nbsp;&nbsp;var p = document.createElement('i');<br />&nbsp;&nbsp;&nbsp;var a = document.createElement('a');<br />&nbsp;&nbsp;&nbsp;span.style.position = 'absolute';<br />&nbsp;&nbsp;&nbsp;span.style.fontSize = n/10+'px';<br />&nbsp;&nbsp;&nbsp;span.style.left = 0;<br />&nbsp;&nbsp;&nbsp;span.style.top = 0;<br />&nbsp;&nbsp;&nbsp;span.innerHTML = '*';<br />&nbsp;&nbsp;&nbsp;p.style.position = 'absolute';<br />&nbsp;&nbsp;&nbsp;p.style.left = 0;<br />&nbsp;&nbsp;&nbsp;p.style.top = 0;<br />&nbsp;&nbsp;&nbsp;p.innerHTML = '*';<br />&nbsp;&nbsp;&nbsp;a.style.position = 'absolute';<br />&nbsp;&nbsp;&nbsp;a.style.left = 0;<br />&nbsp;&nbsp;&nbsp;a.style.top = 0;<br />&nbsp;&nbsp;&nbsp;a.innerHTML = '*';<br />&nbsp;&nbsp;&nbsp;o.appendChild(span);<br />&nbsp;&nbsp;&nbsp;o.appendChild(p);<br />&nbsp;&nbsp;&nbsp;o.appendChild(a);<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;function spr(){<br />&nbsp;&nbsp;&nbsp;r += R*0.1;<br />&nbsp;&nbsp;&nbsp;ri+= Ri*0.06;<br />&nbsp;&nbsp;&nbsp;rii+= Rii*0.06;<br />&nbsp;&nbsp;&nbsp;sp = o.getElementsByTagName('span');<br />&nbsp;&nbsp;&nbsp;p = o.getElementsByTagName('i');<br />&nbsp;&nbsp;&nbsp;a = o.getElementsByTagName('a');<br />&nbsp;&nbsp;&nbsp;for(var i=0; i&lt;sp.length;i++){<br />&nbsp;&nbsp;&nbsp;&nbsp;sp[i].style.color = c();<br />&nbsp;&nbsp;&nbsp;&nbsp;p[i].style.color = c();<br />&nbsp;&nbsp;&nbsp;&nbsp;a[i].style.color = c();<br />&nbsp;&nbsp;&nbsp;&nbsp;sp[i].style.left=r*Math.cos(360/s*i)+'px';<br />&nbsp;&nbsp;&nbsp;&nbsp;sp[i].style.top=r*Math.sin(360/s*i)+'px';<br />&nbsp;&nbsp;&nbsp;&nbsp;sp[i].style.fontSize=parseFloat(sp[i].style.fontSize)*0.96+'px';<br />&nbsp;&nbsp;&nbsp;&nbsp;p[i].style.left=ri*Math.cos(360/s*i)+'px';<br />&nbsp;&nbsp;&nbsp;&nbsp;p[i].style.top=ri*Math.sin(360/s*i)+'px';<br />&nbsp;&nbsp;&nbsp;&nbsp;p[i].style.fontSize=parseFloat(sp[i].style.fontSize)*0.96+'px';<br />&nbsp;&nbsp;&nbsp;&nbsp;a[i].style.left=rii*Math.cos(360/s*i)+'px';<br />&nbsp;&nbsp;&nbsp;&nbsp;a[i].style.top=rii*Math.sin(360/s*i)+'px';<br />&nbsp;&nbsp;&nbsp;&nbsp;a[i].style.fontSize=parseFloat(sp[i].style.fontSize)*0.96+'px';<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;R-=R*0.1;<br />&nbsp;&nbsp;&nbsp;if(R&lt;2){<br />&nbsp;&nbsp;&nbsp;&nbsp;o.innerHTML = '';<br />&nbsp;&nbsp;&nbsp;&nbsp;o.parentNode.removeChild(o);<br />&nbsp;&nbsp;&nbsp;&nbsp;clearInterval(clearI);<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;var clearI = setInterval(spr,20);<br />&nbsp;}<br />}<br />window.onload = function(){<br />&nbsp;function happyNewYear(){<br />&nbsp;&nbsp;new fireworks();<br />&nbsp;}<br />&nbsp;setInterval(happyNewYear,1000);<br />}<br />&lt;/script&gt;<br />&lt;style type=&quot;text/css&quot;&gt;<br />&lt;/style&gt;<br />&lt;/head&gt;<br />&lt;body style=&quot;background:#000;font:12px Georgia, 'Times New Roman', Times, serif&quot;&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;</p><p><br />提示：您可以先修改部分 代码再运行</p><p>&nbsp;</p><p><br />&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&quot;&gt;<br />&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&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;title&gt;firework - Zehee&lt;/title&gt;<br />&lt;script type=&quot;text/javascript&quot;&gt;<br />var firework = function(){<br />&nbsp;this.size = 40;<br />&nbsp;this.speed = 0.1;<br />&nbsp;this.rise();<br />}<br />firework.prototype = {<br />&nbsp;color:function(){<br />&nbsp;&nbsp;var c = ['0','3','6','9','c','f'];<br />&nbsp;&nbsp;var t = [c[Math.floor(Math.random()*100)%6],'0','f'];<br />&nbsp;&nbsp;t.sort(function(){return Math.random()&gt;0.5?-1:1;});<br />&nbsp;&nbsp;return '#'+t.join('');<br />&nbsp;},<br />&nbsp;aheight:function(){<br />&nbsp;&nbsp;var h = document.documentElement.clientHeight;<br />&nbsp;&nbsp;return Math.abs(Math.floor(Math.random()*h-200))+201;<br />&nbsp;},<br />&nbsp;firecracker:function(){<br />&nbsp;&nbsp;var b = document.createElement('div');<br />&nbsp;&nbsp;var w = document.body.clientWidth;<br />&nbsp;&nbsp;b.style.color = this.color();<br />&nbsp;&nbsp;b.style.position = 'absolute';<br />&nbsp;&nbsp;b.style.bottom = 0;<br />&nbsp;&nbsp;b.style.left = Math.floor(Math.random()*w)+1+'px';<br />&nbsp;&nbsp;document.body.appendChild(b);<br />&nbsp;&nbsp;return b;<br />&nbsp;},<br />&nbsp;rise:function(){<br />&nbsp;&nbsp;var o = this.firecracker();<br />&nbsp;&nbsp;var n = this.aheight();<br />&nbsp;&nbsp;var speed = this.speed;<br />&nbsp;&nbsp;var e = this.expl;<br />&nbsp;&nbsp;var s = this.size;<br />&nbsp;&nbsp;var k = n;<br />&nbsp;&nbsp;var m = function(){<br />&nbsp;&nbsp;&nbsp;o.style.bottom = parseFloat(o.style.bottom)+k*speed+'px';<br />&nbsp;&nbsp;&nbsp;k-=k*speed;<br />&nbsp;&nbsp;&nbsp;if(k&lt;2){<br />&nbsp;&nbsp;&nbsp;&nbsp;clearInterval(clear);<br />&nbsp;&nbsp;&nbsp;&nbsp;e(o,n,s,speed);<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;o.innerHTML = '*';<br />&nbsp;&nbsp;if(parseInt(o.style.bottom)&lt;n){<br />&nbsp;&nbsp;&nbsp;var clear = setInterval(m,20);<br />&nbsp;&nbsp;}<br />&nbsp;},<br />&nbsp;expl:function(o,n,s,speed){<br />&nbsp;&nbsp;var R = n/3;<br />&nbsp;&nbsp;var Ri = n/6;<br />&nbsp;&nbsp;var r = 0;<br />&nbsp;&nbsp;var ri = 0;<br />&nbsp;&nbsp;for(var i=0;i&lt;s;i++){<br />&nbsp;&nbsp;&nbsp;var span = document.createElement('span');<br />&nbsp;&nbsp;&nbsp;var p = document.createElement('p');<br />&nbsp;&nbsp;&nbsp;span.style.position = 'absolute';<br />&nbsp;&nbsp;&nbsp;span.style.left = 0;<br />&nbsp;&nbsp;&nbsp;span.style.top = 0;<br />&nbsp;&nbsp;&nbsp;span.innerHTML = '*';<br />&nbsp;&nbsp;&nbsp;p.style.position = 'absolute';<br />&nbsp;&nbsp;&nbsp;p.style.left = 0;<br />&nbsp;&nbsp;&nbsp;p.style.top = 0;<br />&nbsp;&nbsp;&nbsp;p.innerHTML = '+';<br />&nbsp;&nbsp;&nbsp;o.appendChild(span);<br />&nbsp;&nbsp;&nbsp;o.appendChild(p);<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;function spr(){<br />&nbsp;&nbsp;&nbsp;r += R*speed;<br />&nbsp;&nbsp;&nbsp;ri+= Ri*speed/2;<br />&nbsp;&nbsp;&nbsp;sp = o.getElementsByTagName('span');<br />&nbsp;&nbsp;&nbsp;p = o.getElementsByTagName('p');<br />&nbsp;&nbsp;&nbsp;for(var i=0; i&lt;sp.length;i++){<br />&nbsp;&nbsp;&nbsp;&nbsp;sp[i].style.left=r*Math.cos(360/s*i)+'px';<br />&nbsp;&nbsp;&nbsp;&nbsp;sp[i].style.top=r*Math.sin(360/s*i)+'px';<br />&nbsp;&nbsp;&nbsp;&nbsp;p[i].style.left=ri*Math.cos(360/s*i)+'px';<br />&nbsp;&nbsp;&nbsp;&nbsp;p[i].style.top=ri*Math.sin(360/s*i)+'px';<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;R-=R*speed;<br />&nbsp;&nbsp;&nbsp;if(R&lt;2){<br />&nbsp;&nbsp;&nbsp;&nbsp;clearInterval(clearI);<br />&nbsp;&nbsp;&nbsp;&nbsp;o.parentNode.removeChild(o);<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;var clearI = setInterval(spr,20);<br />&nbsp;}<br />}<br />window.onload = function(){<br />&nbsp;function happyNewYear(){<br />&nbsp;&nbsp;new firework();<br />&nbsp;}<br />&nbsp;setInterval(happyNewYear,400);<br />}<br />&lt;/script&gt;<br />&lt;style type=&quot;text/css&quot;&gt;<br />&lt;/style&gt;<br />&lt;/head&gt;<br />&lt;body style=&quot;background:#000;font:12px Arial&quot;&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;</p><p><br />提示：您可以先修改部分 代码再运行</p><p>&nbsp;</p><p><br />&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&quot;&gt;<br />&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot; &gt;<br />&lt;head&gt;<br />&nbsp;&nbsp;&nbsp; &lt;title&gt;Untitled Page&lt;/title&gt;<br />&lt;/head&gt;<br />&lt;style type=&quot;text/css&quot;&gt;<br />.fire{display:block; overflow:hidden; font-size:12px; position:absolute};<br />body{overflow:hidden; background:#000}<br />html{overflow:hidden; background:#000}<br />&lt;/style&gt;<br />&lt;body&gt;<br />&lt;/body&gt;<br />&lt;script type=&quot;text/javascript&quot;&gt;<br />var Fire = function(r, color) {<br />&nbsp;this.radius = r || 12;<br />&nbsp;this.color = color || &quot;FF6600&quot;;<br />&nbsp;this.xpos = 0;<br />&nbsp;this.ypos = 0;<br />&nbsp;this.zpos = 0;<br />&nbsp;this.vx = 0;<br />&nbsp;this.vy = 0;<br />&nbsp;this.vz = 0;<br />&nbsp;this.mass = 1;<br />&nbsp;this.p = document.createElement(&quot;span&quot;);<br />&nbsp;this.p.className = &quot;fire&quot;;<br />&nbsp;this.p.innerHTML = &quot;*&quot;;<br />&nbsp;this.p.style.fontSize = this.radius + &quot;px&quot;;<br />&nbsp;this.p.style.color = &quot;#&quot; + this.color;<br />}<br />Fire.prototype = {<br />&nbsp;append: function(parent) {<br />&nbsp;&nbsp;parent.appendChild(this.p);<br />&nbsp;},<br />&nbsp;setSize: function(scale) {<br />&nbsp;&nbsp;this.p.style.fontSize = this.radius * scale + &quot;px&quot;;<br />&nbsp;},<br />&nbsp;setPosition:function(x, y) {<br />&nbsp;&nbsp;this.p.style.left = x + &quot;px&quot;;<br />&nbsp;&nbsp;this.p.style.top =&nbsp; y + &quot;px&quot;;<br />&nbsp;},<br />&nbsp;setVisible: function(b) {<br />&nbsp;&nbsp;this.p.style.display = b ? &quot;block&quot; : &quot;none&quot;;<br />&nbsp;}<br />}<br />var fireworks = function() {<br />&nbsp;var fires = new Array();<br />&nbsp;var count = 100;<br />&nbsp;var fl = 250;<br />&nbsp;var vpx = 500;<br />&nbsp;var vpy = 300;<br />&nbsp;var gravity = .3;<br />&nbsp;var floor = 200;<br />&nbsp;var bounce = -.8;<br />&nbsp;var timer;<br />&nbsp;return {<br />&nbsp;&nbsp;init: function() {<br />&nbsp;&nbsp;&nbsp;for (var i=0; i&lt;count; i++) {<br />&nbsp;&nbsp;&nbsp;&nbsp;var color = 0xFF0000;<br />&nbsp;&nbsp;&nbsp;&nbsp;color = (Math.random() * 0xFFFFFF).toString(16).toString().split(&quot;.&quot;)[0];<br />&nbsp;&nbsp;&nbsp;&nbsp;while(color.length &lt; 6) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color = &quot;0&quot; + color;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;var fire = new Fire(12, color);<br />&nbsp;&nbsp;&nbsp;&nbsp;fires.push(fire);<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.ypos = -100;<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.vx = Math.random() * 6 - 3;<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.vy = Math.random() * 6 - 3;<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.vz = Math.random() * 6 - 3;<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.append(document.body);<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;var that = this;<br />&nbsp;&nbsp;&nbsp;timer = setInterval(function() {<br />&nbsp;&nbsp;&nbsp;&nbsp;for (var i=0;i&lt;count; i++) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;that.move(fires[i]);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;}, 30);<br />&nbsp;&nbsp;},<br />&nbsp;&nbsp;move: function(fire) {<br />&nbsp;&nbsp;&nbsp;fire.vy += gravity;<br />&nbsp;&nbsp;&nbsp;fire.xpos += fire.vx;<br />&nbsp;&nbsp;&nbsp;fire.ypos += fire.vy;<br />&nbsp;&nbsp;&nbsp;fire.zpos += fire.vz;<br />&nbsp;&nbsp;&nbsp;if (fire.ypos &gt; floor) {<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.ypos = floor;<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.vy *= bounce;<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;if (fire.zpos &gt; -fl) {<br />&nbsp;&nbsp;&nbsp;&nbsp;var scale = fl/ (fl+fire.zpos);<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.setSize(scale);<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.setPosition(vpx + fire.xpos * scale,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vpy + fire.ypos * scale);<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.setVisible(true);<br />&nbsp;&nbsp;&nbsp;} else {<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.setVisible(false);<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;}<br />&nbsp;}<br />}<br />fireworks().init();<br />&lt;/script&gt;<br />&lt;/html&gt;</p><p><br />提示：您可以先修改部分 代码再运行</p><p>&nbsp;</p><p><br />&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&quot;&gt;<br />&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot; &gt;<br />&lt;head&gt;<br />&nbsp;&nbsp;&nbsp; &lt;title&gt;Untitled Page&lt;/title&gt;<br />&lt;/head&gt;<br />&lt;style type=&quot;text/css&quot;&gt;<br />.fire{display:block; overflow:hidden; font-size:12px; position:absolute};<br />body{overflow:hidden; background:#000}<br />html{overflow:hidden; background:#000}<br />&lt;/style&gt;<br />&lt;body&gt;<br />&lt;/body&gt;<br />&lt;script type=&quot;text/javascript&quot;&gt;<br />var Fire = function(r, color) {<br />&nbsp;this.radius = r || 12;<br />&nbsp;this.color = color;<br />&nbsp;this.xpos = 0;<br />&nbsp;this.ypos = 0;<br />&nbsp;this.zpos = 0;<br />&nbsp;this.vx = 0;<br />&nbsp;this.vy = 0;<br />&nbsp;this.vz = 0;<br />&nbsp;this.mass = 1;<br />&nbsp;this.x =0;<br />&nbsp;this.y=0;<br />&nbsp;this.p = document.createElement(&quot;span&quot;);<br />&nbsp;this.p.className = &quot;fire&quot;;<br />&nbsp;this.p.innerHTML = &quot;*&quot;;<br />&nbsp;this.p.style.fontSize = this.radius + &quot;px&quot;;<br />&nbsp;this.p.style.color = &quot;#&quot; + this.color;<br />}<br />Fire.prototype = {<br />&nbsp;append: function(parent) {<br />&nbsp;&nbsp;parent.appendChild(this.p);<br />&nbsp;},<br />&nbsp;setSize: function(scale) {<br />&nbsp;&nbsp;this.p.style.fontSize = this.radius * scale + &quot;px&quot;;<br />&nbsp;},<br />&nbsp;setPosition:function(x, y) {<br />&nbsp;&nbsp;this.p.style.left = x + &quot;px&quot;;<br />&nbsp;&nbsp;this.p.style.top =&nbsp; y + &quot;px&quot;;<br />&nbsp;},<br />&nbsp;setVisible: function(b) {<br />&nbsp;&nbsp;this.p.style.display = b ? &quot;block&quot; : &quot;none&quot;;<br />&nbsp;}<br />}<br />var fireworks = function() {<br />&nbsp;var fires = new Array();<br />&nbsp;var count = 150;<br />&nbsp;var fl = 250;<br />&nbsp;var vpx = 500;<br />&nbsp;var vpy = 300;<br />&nbsp;var gravity = .5;<br />&nbsp;var floor = 200;<br />&nbsp;var bounce = -.8;<br />&nbsp;var timer;<br />&nbsp;var wind = ((Math.floor(Math.random()*3) + 3)/10)*(Math.random()*2 - 1 &gt; 0 ? 1 : -1)*.25;<br />&nbsp;var wpos = 0;<br />&nbsp;var wcount;<br />&nbsp;return {<br />&nbsp;&nbsp;init: function() {<br />&nbsp;&nbsp;&nbsp;wcount = 50 + Math.floor(Math.random() * 100);<br />&nbsp;&nbsp;&nbsp;for (var i=0; i&lt;count; i++) {<br />&nbsp;&nbsp;&nbsp;&nbsp;var color = 0xFF0000;<br />&nbsp;&nbsp;&nbsp;&nbsp;color = (Math.random() * 0xFFFFFF).toString(16).toString().split(&quot;.&quot;)[0];<br />&nbsp;&nbsp;&nbsp;&nbsp;while(color.length &lt; 6) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color = &quot;0&quot; + color;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;var fire = new Fire(12, color);<br />&nbsp;&nbsp;&nbsp;&nbsp;fires.push(fire);<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.ypos = -100;<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.vz = Math.random() * 6 - 3;<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.vx = (Math.random()*2 - 1)*2 ;<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.vy = Math.random()*-15 - 15;<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.x = 500<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.y = 600;<br />&nbsp;&nbsp;&nbsp;&nbsp;fire.append(document.body);<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;var that = this;<br />&nbsp;&nbsp;&nbsp;timer = setInterval(function() {<br />&nbsp;&nbsp;&nbsp;&nbsp;wpos++;<br />&nbsp;&nbsp;&nbsp;&nbsp;if (wpos &gt;= wcount) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wpos = 0;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wcount = 50 + Math.floor(Math.random() * 100);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wind = ((Math.floor(Math.random()*3) + 3)/10)*(Math.random()*2 - 1 &gt; 0 ? 1 : -1)*.25;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;for (var i=0;i&lt;count; i++) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;that.move(fires[i]);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;}, 30);<br />&nbsp;&nbsp;},<br />&nbsp;&nbsp;move: function(fire) {<br />&nbsp;&nbsp;&nbsp;fire.vy += gravity;<br />&nbsp;&nbsp;&nbsp;fire.x += fire.vx;<br />&nbsp;&nbsp;&nbsp;fire.y += fire.vy;<br />&nbsp;&nbsp;&nbsp;fire.vx += wind;<br />&nbsp;&nbsp;&nbsp;fire.setPosition(fire.x, fire.y);<br />&nbsp;&nbsp;&nbsp;&nbsp;if (fire.x &lt; 0 || fire.x &gt;1000 || fire.y&nbsp; &lt; 0 || fire.y&nbsp; &gt; 600) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fire.vx = (Math.random()*2 - 1)*2;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fire.vy = Math.random()*-15 - 15;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fire.x = 500;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fire.y = 600;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fire.setPosition(fire.x, fire.y);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;}<br />&nbsp;}<br />}<br />fireworks().init();<br />&lt;/script&gt;<br />&lt;/html&gt;</p><p><br />提示：您可以先修改部分 代码再运行</p>]]></description><category>css+div</category><comments>http://www.zhangmeigong.cn/post/215.html#comment</comments><wfw:comment>http://www.zhangmeigong.cn/</wfw:comment><wfw:commentRss>http://www.zhangmeigong.cn/feed.asp?cmt=215</wfw:commentRss><trackback:ping>http://www.zhangmeigong.cn/cmd.asp?act=tb&amp;id=215&amp;key=e1e90ef0</trackback:ping></item><item><title>Div+Css实例：用CSS控制字符宽度省略号效果</title><author>a@b.com (张美工)</author><link>http://www.zhangmeigong.cn/post/214.html</link><pubDate>Wed, 04 Aug 2010 14:12:29 +0800</pubDate><guid>http://www.zhangmeigong.cn/post/214.html</guid><description><![CDATA[<p>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&quot;&gt;<br />&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot;&gt;<br />&lt;head&gt;<br />&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=gb2312&quot; /&gt;<br />&lt;title&gt;<span style="color: #ff6600">Div+Css实例：用CSS控制字符宽度省略号效果</span>&lt;/title&gt;<br />&lt;/head&gt;<br /><span style="color: #ff00ff">&lt;style type=&quot;text/css&quot;&gt;</span><br /><span style="color: #ff00ff"><br />*{ <span style="color: #000000">margin:0; padding:0; </span>}<br />a{ <span style="color: #000000">text-decoration:none; color:#000000</span>;}<br />a:hover{ <span style="color: #000000">text-decoration:none; color:#000000</span>;}<br />ul{ <span style="color: #000000">width:300px; height:120px; margin:40px auto; padding:12px 4px 12px 24px; border:1px solid #D4D4D4; background:#F1F1F1</span>;}<br />li{ <span style="color: #000000">margin:12px 0</span>; }<br />li a{ <span style="color: #000000">display:block; width:200px; overflow:hidden<span style="color: #000000">;</span><span style="color: #999999">/*注意不要写在最后了*/</span>white-space:nowrap; -o-text-overflow:ellipsis;text-overflow:ellipsis</span>;}<br /><span style="color: #999999">/* firefox only */<br /></span>li:not(p){ <span style="color: #000000">clear:both</span>;}<br />li:not(p) a{ <span style="color: #000000">max-width:170px; float:left</span>;}<br />li:not(p):after{ <span style="color: #000000">content: &quot;<strong><span style="color: #008080">...</span></strong>&quot;; float:left; width:40px; padding-left:5px; color:#000</span>;}<br /><br />&lt;/style&gt;<br /></span>&lt;body&gt;<br />&lt;ul&gt;<br />&nbsp;&lt;li&gt;&lt;a href=&quot;<a href="http://www.zhangmeigong.cn">http://www.zhangmeigong.cn</a>&quot;&gt;一个在IE6下no-repeat依然重复背景图片的BUG&lt;/a&gt;&lt;/li&gt;<br />&nbsp;&lt;li&gt;&lt;a href=&quot;<a href="http://www.zhangmeigong.cn/">http://www.zhangmeigong.cn</a><a href="http://www.51itrencai.com/Programming/Info.asp?infoid=198&quot;&gt;Div+Css">&quot;&gt;Div+Css</a>实例：用CSS制作的热门内容排行效果&lt;/a&gt;&lt;/li&gt;<br />&nbsp;&lt;li&gt;&lt;a href=&quot;<a href="http://www.zhangmeigong.cn/">http://www.zhangmeigong.cn</a><a href="http://www.51itrencai.com/Programming/Info.asp?infoid=193&quot;&gt;Div+Css">&quot;&gt;Div+Css</a>:浅淡!important对CSS的重要性&lt;/a&gt;&lt;/li&gt;<br />&nbsp;&lt;li&gt;&lt;a href=&quot;<a href="http://www.zhangmeigong.cn/">http://www.zhangmeigong.cn</a>&quot;&gt;用CSS实现中英文双语导航菜单&lt;/a&gt;&lt;/li&gt;<br />&lt;/ul&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;<br />&nbsp;</p>]]></description><category>css+div</category><comments>http://www.zhangmeigong.cn/post/214.html#comment</comments><wfw:comment>http://www.zhangmeigong.cn/</wfw:comment><wfw:commentRss>http://www.zhangmeigong.cn/feed.asp?cmt=214</wfw:commentRss><trackback:ping>http://www.zhangmeigong.cn/cmd.asp?act=tb&amp;id=214&amp;key=de77f34c</trackback:ping></item><item><title>控制文本框字符数</title><author>a@b.com (张美工)</author><link>http://www.zhangmeigong.cn/post/213.html</link><pubDate>Tue, 03 Aug 2010 14:40:37 +0800</pubDate><guid>http://www.zhangmeigong.cn/post/213.html</guid><description><![CDATA[<p>&lt;html&gt;</p><p>&lt;head&gt;</p><p>&lt;title&gt;控制文本框字符数&lt;/title&gt;</p><p>&lt;/head&gt;</p><p><span style="font-size: medium;"><span style="color: rgb(255, 102, 0);">&lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt;<br /><span style="color: rgb(153, 153, 153);">&lt;!-- Begin</span><br />maxLen = <span style="color: rgb(255, 0, 0);">20</span>; <span style="color: rgb(153, 153, 153);">//设置最大字符数</span><br /><br />function checkMaxInput(form) {<br />if (form.message.value.length &gt; maxLen)<span style="color: rgb(153, 153, 153);"> // if too long.... trim it!</span><br />form.message.value = form.message.value.<span style="color: rgb(51, 153, 102);">substring</span>(<span style="color: rgb(255, 0, 0);">0</span>, maxLen);<br /><span style="color: rgb(153, 153, 153);">// otherwise, update 'characters left' counter</span><br />else form.remLen.value = maxLen - form.message.value.length;<br />}<br /><span style="color: rgb(153, 153, 153);">//&nbsp; End --&gt;</span><br />&lt;/</span><span style="color: rgb(255, 102, 0);">SCRIPT</span><span style="color: rgb(255, 102, 0);">&gt;</span></span></p><p><span style="font-size: medium;"><span style="color: rgb(0, 128, 128);">&lt;form&nbsp;&nbsp; name=myform&nbsp;&nbsp;&nbsp; action=&quot;YOUR-SCRIPT.CGI&quot;&gt;</span><br type="_moz" /></span></p><p><span style="font-size: medium;"><span style="color: rgb(0, 128, 128);">&lt;font&nbsp; size=<span style="color: rgb(255, 153, 0);">&quot;1&quot;</span>&nbsp;&nbsp; face=<span style="color: rgb(255, 153, 0);">&quot;arial, helvetica, sans-serif&quot;</span> &gt;<span style="color: rgb(0, 0, 0);"> ( 最多只能输入20个字符！)</span>&lt;br&gt;</span></span></p><p><span style="font-size: medium;"><span style="color: rgb(0, 128, 128);">&lt;textarea &nbsp; name=message&nbsp;&nbsp; wrap=physical&nbsp;&nbsp; cols=<span style="color: rgb(255, 153, 0);">28</span> &nbsp; rows=<span style="color: rgb(255, 153, 0);">4</span>&nbsp;&nbsp; onKeyDown=<span style="color: rgb(255, 153, 0);">&quot;checkMaxInput(this.form)&quot;</span>&nbsp;&nbsp; onKeyUp=<span style="color: rgb(255, 153, 0);">&quot;checkMaxInput(this.form)&quot;</span>&gt;&lt;/textarea&gt;<br />&lt;br&gt;<br />&lt;input &nbsp; readonly&nbsp;&nbsp; type=text &nbsp; name=remLen&nbsp;&nbsp; size=<span style="color: rgb(255, 153, 0);">3</span>&nbsp;&nbsp; maxlength=<span style="color: rgb(255, 153, 0);">3</span>&nbsp;&nbsp; value=<span style="color: rgb(255, 153, 0);">&quot;20&quot;</span>&gt;<span style="color: rgb(0, 0, 0);"> characters left</span>&lt;/font&gt;<br />&lt;/form&gt;</span></span><span style="color: rgb(51, 153, 102);"><br /></span></p><p>&lt;body&gt;</p><p>&lt;/body&gt;</p><p>&lt;/html&gt;</p>]]></description><category>css+div</category><comments>http://www.zhangmeigong.cn/post/213.html#comment</comments><wfw:comment>http://www.zhangmeigong.cn/</wfw:comment><wfw:commentRss>http://www.zhangmeigong.cn/feed.asp?cmt=213</wfw:commentRss><trackback:ping>http://www.zhangmeigong.cn/cmd.asp?act=tb&amp;id=213&amp;key=0c0a292a</trackback:ping></item><item><title>基本的 HTML 标签 </title><author>a@b.com (张美工)</author><link>http://www.zhangmeigong.cn/post/212.html</link><pubDate>Mon, 05 Jul 2010 10:27:26 +0800</pubDate><guid>http://www.zhangmeigong.cn/post/212.html</guid><description><![CDATA[<p><table border="0" cellpadding="0">    <tbody>        <tr>            <td style="border-bottom: #f0f0f0; border-left: #f0f0f0; padding-bottom: 0.75pt; background-color: transparent; padding-left: 0.75pt; padding-right: 0.75pt; border-top: #f0f0f0; border-right: #f0f0f0; padding-top: 0.75pt">            <div align="left"><span style="font-size: 12pt">标签描述 </span></div>            </td>        </tr>        <tr>            <td style="border-bottom: #f0f0f0; border-left: #f0f0f0; padding-bottom: 0.75pt; background-color: transparent; padding-left: 0.75pt; padding-right: 0.75pt; border-top: #f0f0f0; border-right: #f0f0f0; padding-top: 0.75pt">            <div align="left"><span style="font-size: 12pt"><a href="http://www.dosite.cn/tags/tag_html.asp"><span style="color: #3b5998; text-decoration: none; text-underline: none">&lt;html&gt;</span></a></span></div>            </td>            <td style="border-bottom: #f0f0f0; border-left: #f0f0f0; padding-bottom: 0.75pt; background-color: transparent; padding-left: 0.75pt; padding-right: 0.75pt; border-top: #f0f0f0; border-right: #f0f0f0; padding-top: 0.75pt">            <div align="left"><span style="font-size: 12pt">定义 HTML 文档。</span></div>            </td>        </tr>        <tr>            <td style="border-bottom: #f0f0f0; border-left: #f0f0f0; padding-bottom: 0.75pt; background-color: transparent; padding-left: 0.75pt; padding-right: 0.75pt; border-top: #f0f0f0; border-right: #f0f0f0; padding-top: 0.75pt">            <div align="left"><span style="font-size: 12pt"><a href="http://www.dosite.cn/tags/tag_body.asp"><span style="color: #3b5998; text-decoration: none; text-underline: none">&lt;body&gt;</span></a></span></div>            </td>            <td style="border-bottom: #f0f0f0; border-left: #f0f0f0; padding-bottom: 0.75pt; background-color: transparent; padding-left: 0.75pt; padding-right: 0.75pt; border-top: #f0f0f0; border-right: #f0f0f0; padding-top: 0.75pt">            <div align="left"><span style="font-size: 12pt">定义文档的主体。</span></div>            </td>        </tr>        <tr>            <td style="border-bottom: #f0f0f0; border-left: #f0f0f0; padding-bottom: 0.75pt; background-color: transparent; padding-left: 0.75pt; padding-right: 0.75pt; border-top: #f0f0f0; border-right: #f0f0f0; padding-top: 0.75pt">            <div align="left"><span style="font-size: 12pt"><a href="http://www.dosite.cn/tags/tag_hn.asp"><span style="color: #3b5998; text-decoration: none; text-underline: none">&lt;h1&gt; to &lt;h6&gt;</span></a></span></div>            </td>            <td style="border-bottom: #f0f0f0; border-left: #f0f0f0; padding-bottom: 0.75pt; background-color: transparent; padding-left: 0.75pt; padding-right: 0.75pt; border-top: #f0f0f0; border-right: #f0f0f0; padding-top: 0.75pt">            <div align="left"><span style="font-size: 12pt">定义标题 1 至标题 6。</span></div>            </td>        </tr>        <tr>            <td style="border-bottom: #f0f0f0; border-left: #f0f0f0; padding-bottom: 0.75pt; background-color: transparent; padding-left: 0.75pt; padding-right: 0.75pt; border-top: #f0f0f0; border-right: #f0f0f0; padding-top: 0.75pt">            <div align="left"><span style="font-size: 12pt"><a href="http://www.dosite.cn/tags/tag_p.asp"><span style="color: #3b5998; text-decoration: none; text-underline: none">&lt;p&gt;</span></a></span></div>            </td>            <td style="border-bottom: #f0f0f0; border-left: #f0f0f0; padding-bottom: 0.75pt; background-color: transparent; padding-left: 0.75pt; padding-right: 0.75pt; border-top: #f0f0f0; border-right: #f0f0f0; padding-top: 0.75pt">            <div align="left"><span style="font-size: 12pt">定义段落。</span></div>            </td>        </tr>        <tr>            <td style="border-bottom: #f0f0f0; border-left: #f0f0f0; padding-bottom: 0.75pt; background-color: transparent; padding-left: 0.75pt; padding-right: 0.75pt; border-top: #f0f0f0; border-right: #f0f0f0; padding-top: 0.75pt">            <div align="left"><span style="font-size: 12pt"><a href="http://www.dosite.cn/tags/tag_br.asp"><span style="color: #3b5998; text-decoration: none; text-underline: none">&lt;br&gt;</span></a></span></div>            </td>            <td style="border-bottom: #f0f0f0; border-left: #f0f0f0; padding-bottom: 0.75pt; background-color: transparent; padding-left: 0.75pt; padding-right: 0.75pt; border-top: #f0f0f0; border-right: #f0f0f0; padding-top: 0.75pt">            <div align="left"><span style="font-size: 12pt">插入折行。</span></div>            </td>        </tr>        <tr>            <td style="border-bottom: #f0f0f0; border-left: #f0f0f0; padding-bottom: 0.75pt; background-color: transparent; padding-left: 0.75pt; padding-right: 0.75pt; border-top: #f0f0f0; border-right: #f0f0f0; padding-top: 0.75pt">            <div align="left"><span style="font-size: 12pt"><a href="http://www.dosite.cn/tags/tag_hr.asp"><span style="color: #3b5998; text-decoration: none; text-underline: none">&lt;hr&gt;</span></a></span></div>            </td>            <td style="border-bottom: #f0f0f0; border-left: #f0f0f0; padding-bottom: 0.75pt; background-color: transparent; padding-left: 0.75pt; padding-right: 0.75pt; border-top: #f0f0f0; border-right: #f0f0f0; padding-top: 0.75pt">            <div align="left"><span style="font-size: 12pt">定义水平线。</span></div>            </td>        </tr>        <tr>            <td style="border-bottom: #f0f0f0; border-left: #f0f0f0; padding-bottom: 0.75pt; background-color: transparent; padding-left: 0.75pt; padding-right: 0.75pt; border-top: #f0f0f0; border-right: #f0f0f0; padding-top: 0.75pt">            <div align="left"><span style="font-size: 12pt"><a href="http://www.dosite.cn/tags/tag_comment.asp"><span style="color: #3b5998; text-decoration: none; text-underline: none">&lt;!--&gt;</span></a></span></div>            </td>            <td style="border-bottom: #f0f0f0; border-left: #f0f0f0; padding-bottom: 0.75pt; background-color: transparent; padding-left: 0.75pt; padding-right: 0.75pt; border-top: #f0f0f0; border-right: #f0f0f0; padding-top: 0.75pt">            <div align="left"><span style="font-size: 12pt">定义注释。</span></div>            </td>        </tr>    </tbody></table></p><div align="left"><u><span style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></u></div><div align="left">&nbsp;</div><div align="left"><b><span style="font-size: 12pt">标题</span></b></div><div align="left"><span style="font-size: 12pt">标题使用 &lt;h1&gt; 至 &lt;h6&gt; 标签进行定义。&lt;h1&gt; 定义最大的标题。&lt;h6&gt; 定义最小的标题。</span></div><div align="left"><span style="font-size: 12pt">&lt;h1&gt;This is a heading&lt;/h1&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;h2&gt;This is a heading&lt;/h2&gt;</span></div><div align="left"><span style="font-size: 12pt">&lt;h3&gt;This is a heading&lt;/h3&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;h4&gt;This is a heading&lt;/h4&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;h5&gt;This is a heading&lt;/h5&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;h6&gt;This is a heading&lt;/h6&gt; </span></div><div align="left"><span style="font-size: 12pt">HTML </span><span style="font-size: 12pt">会自动在标题前后添加一个额外的折行。</span></div><div align="left">&nbsp;</div><div align="left"><b><span style="font-size: 12pt">段落</span></b></div><div align="left"><span style="font-size: 12pt">段落使用 &lt;p&gt; 标签进行定义。</span></div><div align="left"><span style="font-size: 12pt">&lt;p&gt;This is a paragraph&lt;/p&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;p&gt;This is another paragraph&lt;/p&gt; </span></div><div align="left"><span style="font-size: 12pt">HTML </span><span style="font-size: 12pt">会自动在段落前后添加一个额外的空行。</span></div><div align="left">&nbsp;</div><div align="left"><b><span style="font-size: 12pt">换行符</span></b></div><div align="left"><span style="font-size: 12pt">当你打算结束一行，而又不想开始一个新段落时，&lt;br&gt; 标签就派上用场了。无论你将它置于何处，&lt;br&gt; 标签都会产生一个强制的换行。</span></div><div align="left"><span style="font-size: 12pt">&lt;p&gt;This &lt;br&gt; is a para&lt;br&gt;graph with line breaks&lt;/p&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;br&gt; </span><span style="font-size: 12pt">标签是空白标签，由于关闭标签没有任何意义，因此它没有类似 &lt;/br&gt; 的终止标签。</span></div><div align="left"><span style="font-size: 12pt">&lt;br&gt; </span><span style="font-size: 12pt">还是 &lt;br /&gt; </span></div><div align="left"><span style="font-size: 12pt">您会越来越多地发现 &lt;br&gt; 与 &lt;br /&gt; 很相似。</span></div><div align="left"><span style="font-size: 12pt">由于 &lt;br&gt; 没有结束标签，它也就违反了未来的 HTML 的规则之一，即所有的元素都必须关闭。</span></div><div align="left"><span style="font-size: 12pt">把这个标签写为 &lt;br /&gt; 是经得起未来考验的做法，XHTML 和 XML 都接受在打开的标签内部来关闭标签的做法。</span></div><div align="left">&nbsp;</div><div align="left"><b><span style="font-size: 12pt">HTML </span></b><b><span style="font-size: 12pt">注释</span></b></div><div align="left"><span style="font-size: 12pt">注释标签用于在 HTML 源码中插入注释。注释会被浏览器忽略。您可以使用注释对您的代码进行解释，这么做在以后的日子里会对您的代码编辑产生帮助。</span></div><div align="left"><span style="font-size: 12pt">&lt;!-- This is a comment --&gt; </span></div><div align="left"><span style="font-size: 12pt">注意：左括号后需要写一个惊叹号，右括号前就不需要了。</span></div><div align="left">&nbsp;</div><div align="left"><b><span style="font-size: 12pt">锚标签和 Href 属性</span></b></div><div align="left"><b><span style="font-size: 12pt">HTML </span></b><b><span style="font-size: 12pt">使用 &lt;a&gt; （锚）标签来创建连接另一个文档的链接。</span></b></div><div align="left"><span style="font-size: 12pt">锚可以指向网络上的任何资源：一张 HTML 页面，一幅图像，一个声音或视频文件等等。</span></div><div align="left"><span style="font-size: 12pt">创建锚的语法：</span></div><div align="left">&nbsp;</div><div align="left"><span style="font-size: 12pt">&lt;a href=&quot;url&quot;&gt;Text to be displayed&lt;/a&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;a&gt; </span><span style="font-size: 12pt">用来创建锚。href 属性用于定位需要链接的文档，锚的开始标签和结束标签之间的文字被作为超级链接来显示。</span></div><div align="left"><span style="font-size: 12pt">这个锚定义了指向 Dosite 的链接：</span></div><div align="left"><span style="font-size: 12pt">&lt;a href=&quot;http://www.Dosite.cn/&quot;&gt;Visit Dosite!&lt;/a&gt;</span></div><div align="left">&nbsp;</div><div align="left">&nbsp;</div><div align="left"><b><span style="font-size: 12pt">Target </span></b><b><span style="font-size: 12pt">属性</span></b></div><div align="left"><span style="font-size: 12pt">使用 Target 属性，你可以定义被链接的文档在何处显示。</span></div><div align="left"><span style="font-size: 12pt">下面的这行会在新窗口打开文档：</span></div><div align="left"><span style="font-size: 12pt">&lt;a href=&quot;http://www.Dosite.cn/&quot; target=&quot;_blank&quot;&gt;Visit Dosite!&lt;/a&gt; </span></div><div align="left">&nbsp;</div><div align="left">&nbsp;</div><div align="left"><b><span style="font-size: 12pt">锚标签和 Name 属性</span></b></div><div align="left"><span style="font-size: 12pt">Name </span><span style="font-size: 12pt">属性用于创建被命名的锚（named anchors）。当使用命名锚（named anchors）时，我们可以创建直接跳至页面中某个节的链接，这样使用者就无需不停的滚动页面来寻找他们需要的信息。</span></div><div align="left"><span style="font-size: 12pt">以下是命名锚的语法：</span></div><div align="left"><span style="font-size: 12pt">&lt;a name=&quot;label&quot;&gt;Text to be displayed&lt;/a&gt; </span></div><div align="left"><span style="font-size: 12pt">name </span><span style="font-size: 12pt">属性用于创建命名锚。锚的名称可以是任何你喜欢的名字。</span></div><div align="left"><span style="font-size: 12pt">下面这行定义了命名锚：</span></div><div align="left"><span style="font-size: 12pt">&lt;a name=&quot;tips&quot;&gt;Useful Tips Section&lt;/a&gt; </span></div><div align="left"><span style="font-size: 12pt">你会注意到，命名锚会以特殊的方式来显示。</span></div><div align="left"><span style="font-size: 12pt">将 # 符号和锚名称添加到 URL 的末端，就可以直接链接到 tips 这个节，就像这样：</span></div><div align="left"><span style="font-size: 12pt">&lt;a href=&quot;http://www.Dosite.cn/html_links.asp#tips&quot;&gt; Jump to the Useful Tips Section &lt;/a&gt;</span></div><div align="left">&nbsp;</div><div align="left">&nbsp;</div><div align="left"><b><span style="font-size: 12pt">框架结构标签（&lt;frameset&gt;）</span></b></div><ul type="disc">    <li style="text-align: left"><span style="font-size: 12pt">框架结构标签（&lt;frameset&gt;）定义如何将窗口分割为框架 </span></li>    <li style="text-align: left"><span style="font-size: 12pt">每个 frameset 定义了一系列行<i>或</i>列 </span></li>    <li style="text-align: left"><span style="font-size: 12pt">rows/columns </span><span style="font-size: 12pt">的值规定了每行或每列占据屏幕的面积 </span></li></ul><div align="left"><span style="font-size: 12pt">编者注：frameset 标签也被某些文章和书籍译为框架集。</span></div><div align="left"><b><span style="font-size: 12pt">框架标签（Frame）</span></b></div><div align="left"><span style="font-size: 12pt">Frame </span><span style="font-size: 12pt">标签定义了放置在每个框架中的 HTML 文档。</span></div><div align="left"><span style="font-size: 12pt">在下面的这个例子中，我们设置了一个两列的框架集。第一列被设置为占据浏览器窗口的 25%。第二列被设置为占据浏览器窗口的 75%。HTML 文档 &quot;frame_a.htm&quot; 被置于第一个列中，而 HTML 文档 &quot;frame_b.htm&quot; 被置于第二个列中：</span></div><div align="left"><span style="font-size: 12pt">&lt;frameset cols=&quot;25%,75%&quot;&gt; &nbsp;&nbsp; &lt;frame src=&quot;frame_a.htm&quot;&gt; &nbsp;&nbsp; &lt;frame src=&quot;frame_b.htm&quot;&gt; &lt;/frameset&gt;</span></div><div align="left">&nbsp;</div><div align="left">&nbsp;</div><div align="left"><b><span style="font-size: 12pt">表格</span></b></div><div align="left"><span style="font-size: 12pt">表格由 &lt;table&gt; 标签来定义。每个表格均有若干行（由 &lt;tr&gt; 标签定义），每行被分割为若干单元格（由 &lt;td&gt; 标签定义）。字母 td 指表格数据（table data），即数据单元格的内容。数据单元格可以包含文本、图片、列表、段落、表单、水平线、表格等等。</span></div><div align="left"><span style="font-size: 12pt">&lt;table border=&quot;1&quot;&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;tr&gt;</span></div><div align="left"><span style="font-size: 12pt">&lt;td&gt;row 1, cell 1&lt;/td&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;td&gt;row 1, cell 2&lt;/td&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;/tr&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;tr&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;td&gt;row 2, cell 1&lt;/td&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;td&gt;row 2, cell 2&lt;/td&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;/tr&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;/table&gt;</span></div><div align="left">&nbsp;</div><div align="left"><b><span style="font-size: 12pt">表格和边框属性</span></b></div><div align="left"><span style="font-size: 12pt">如果不定义边框属性，表格将不显示边框。有时这很有用，但是大多数时候，我们希望显示边框。</span></div><div align="left"><span style="font-size: 12pt">使用边框属性来显示一个带有边框的表格</span></div><div align="left"><span style="font-size: 12pt">&lt;table border=&quot;1&quot;&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;tr&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;td&gt;Row 1, cell 1&lt;/td&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;td&gt;Row 1, cell 2&lt;/td&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;/tr&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;/table&gt;</span></div><div align="left">&nbsp;</div><div align="left"><b><span style="font-size: 12pt">表格的表头</span></b></div><div align="left"><span style="font-size: 12pt">表格的表头使用 &lt;th&gt; 标签进行定义。</span></div><div align="left"><span style="font-size: 12pt">&lt;table border=&quot;1&quot;&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;tr&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;th&gt;Heading&lt;/th&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;th&gt;Another Heading&lt;/th&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;/tr&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;tr&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;td&gt;row 1, cell 1&lt;/td&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;td&gt;row 1, cell 2&lt;/td&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;/tr&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;tr&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;td&gt;row 2, cell 1&lt;/td&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;td&gt;row 2, cell 2&lt;/td&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;/tr&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;/table&gt;</span></div><div align="left">&nbsp;</div><div align="left"><b><span style="font-size: 12pt">表格中的空单元格</span></b></div><div align="left"><span style="font-size: 12pt">在大多数浏览器中，没有内容的表格单元显示得不太好。</span></div><div align="left"><span style="font-size: 12pt">&lt;table border=&quot;1&quot;&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;tr&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;td&gt;row 1, cell 1&lt;/td&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;td&gt;row 1, cell 2&lt;/td&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;/tr&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;tr&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;td&gt;row 2, cell 1&lt;/td&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;td&gt;&lt;/td&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;/tr&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;/table&gt;</span></div><div align="left">&nbsp;</div><div align="left"><b><span style="font-size: 12pt">HTML </span></b><b><span style="font-size: 12pt">列表</span></b></div><div align="left"><b><span style="font-size: 12pt">HTML </span></b><b><span style="font-size: 12pt">支持有序、无序和定义列表</span></b></div><div align="left">&nbsp;</div><div align="left"><b><span style="font-size: 12pt">无序列表</span></b></div><div align="left"><span style="font-size: 12pt">无序列表是一个项目的列表，此列项目使用粗体圆点（典型的小黑圆圈）进行标记。</span></div><div align="left"><span style="font-size: 12pt">无序列表始于 &lt;ul&gt; 标签。每个列表项始于 &lt;li&gt;。</span></div><div align="left"><span style="font-size: 12pt">&lt;ul&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;li&gt;Coffee&lt;/li&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;li&gt;Milk&lt;/li&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;/ul&gt; </span></div><div align="left"><span style="font-size: 12pt">列表项内部可以使用段落、换行符、图片、链接以及其他列表等等。</span></div><div align="left"><b><span style="font-size: 12pt">有序列表</span></b></div><div align="left"><span style="font-size: 12pt">同样，有序列表也是一列项目，列表项目使用数字进行标记。</span></div><div align="left"><span style="font-size: 12pt">有序列表始于 &lt;ol&gt; 标签。每个列表项始于 &lt;li&gt; 标签。</span></div><div align="left"><span style="font-size: 12pt">&lt;ol&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;li&gt;Coffee&lt;/li&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;li&gt;Milk&lt;/li&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;/ol&gt; </span></div><div align="left">&nbsp;</div><div align="left"><span style="font-size: 12pt">列表项内部可以使用段落、换行符、图片、链接以及其他列表等等。</span></div><div align="left"><b><span style="font-size: 12pt">定义列表</span></b></div><div align="left"><span style="font-size: 12pt">自定义列表不仅仅是一列项目，而是项目及其注释的组合。</span></div><div align="left"><span style="font-size: 12pt">自定义列表以 &lt;dl&gt; 标签开始。每个自定义列表项以 &lt;dt&gt; 开始。每个自定义列表项的定义以 &lt;dd&gt; 开始。</span></div><div align="left"><span style="font-size: 12pt">&lt;dl&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;dt&gt;Coffee&lt;/dt&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;dd&gt;Black hot drink&lt;/dd&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;dt&gt;Milk&lt;/dt&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;dd&gt;White cold drink&lt;/dd&gt; </span></div><div align="left"><span style="font-size: 12pt">&lt;/dl&gt; </span></div><div align="left"><span style="font-size: 12pt">浏览器显示如下：</span></div><div align="left"><span style="font-size: 12pt">Coffee Black hot drink Milk White cold drink </span></div><div align="left"><span style="font-size: 12pt">定义列表的列表项内部可以使用段落、换行符、图片、链接以及其他列表等等。</span></div>]]></description><category>css+div</category><comments>http://www.zhangmeigong.cn/post/212.html#comment</comments><wfw:comment>http://www.zhangmeigong.cn/</wfw:comment><wfw:commentRss>http://www.zhangmeigong.cn/feed.asp?cmt=212</wfw:commentRss><trackback:ping>http://www.zhangmeigong.cn/cmd.asp?act=tb&amp;id=212&amp;key=616cfa19</trackback:ping></item><item><title>Web前端工程师技能列表</title><author>a@b.com (张美工)</author><link>http://www.zhangmeigong.cn/post/211.html</link><pubDate>Tue, 08 Jun 2010 10:32:40 +0800</pubDate><guid>http://www.zhangmeigong.cn/post/211.html</guid><description><![CDATA[<p><span style="line-height: 150%; font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 要打造<b>一流的</b><b>Web</b><b>产品</b>开发团队，在团队成员基础能力上一定要下功夫。对于Web前端产品开发来说，仅仅掌握Web1.0时代简单的&rdquo;网页套接&rdquo;是完全不够的。我结合自己的团队配备，特此罗列了Web前端产品工程师所涉及的技能列表如下：</span></p><div style="text-align: left; line-height: 150%" align="left"><span style="line-height: 150%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="line-height: 150%">通过许多实际项目，个人认为一个完备的前端产品开发团队，必须拥有如下的人才配备，也希望大家补充：</span></div><ul type="disc">    <li style="text-align: left; line-height: 150%"><span style="line-height: 150%">团队全体成员达到所有技能中的</span><span style="line-height: 150%">a</span><span style="line-height: 150%">级标准</span></li>    <li style="text-align: left; line-height: 150%"><span style="line-height: 150%">团队全体成员必须掌握两项技能中的</span><span style="line-height: 150%">b</span><span style="line-height: 150%">级标准，并保证所有的</span><span style="line-height: 150%">b</span><span style="line-height: 150%">级标准在该团队中有</span><span style="line-height: 150%">50%</span><span style="line-height: 150%">以上成员能达到</span></li>    <li style="text-align: left; line-height: 150%"><span style="line-height: 150%">团队全体成员必须掌握一项技能中的</span><span style="line-height: 150%">c</span><span style="line-height: 150%">级标准，并保证所有的</span><span style="line-height: 150%">c</span><span style="line-height: 150%">级标准在该团队中有</span><span style="line-height: 150%">25%</span><span style="line-height: 150%">以上成员能达到</span></li></ul><div style="text-align: left; line-height: 150%" align="left"><span style="line-height: 150%">&nbsp;&nbsp;&nbsp; </span><span style="line-height: 150%">具体技能描述：</span></div><ul type="disc">    <li style="text-align: left; line-height: 150%"><b><span style="line-height: 150%">【必备】</span></b><b><span style="line-height: 150%">UserInterface</span></b></li>    <li style="text-align: left; line-height: 150%">&nbsp;    <ol type="1">        <li style="text-align: left; line-height: 150%"><span style="line-height: 150%">PhotoShop/Fireworks Design<br />        a - </span><span style="line-height: 150%">配合美工将草图形成具体的符合</span><span style="line-height: 150%">WebPage</span><span style="line-height: 150%">的设计</span><span style="line-height: 150%"><br />        b - </span><span style="line-height: 150%">有快速制作分层高品质</span><span style="line-height: 150%">PSD</span><span style="line-height: 150%">、</span><span style="line-height: 150%">PNG</span><span style="line-height: 150%">的能力</span><span style="line-height: 150%"><br />        c - </span><span style="line-height: 150%">能迅速将</span><span style="line-height: 150%">PSD</span><span style="line-height: 150%">、</span><span style="line-height: 150%">PNG</span><span style="line-height: 150%">的内容构思成</span><span style="line-height: 150%">div+css</span><span style="line-height: 150%">或者</span><span style="line-height: 150%">table</span><span style="line-height: 150%">等</span><span style="line-height: 150%">HTML</span><span style="line-height: 150%">代码</span></li>        <li style="text-align: left; line-height: 150%"><span style="line-height: 150%">Flash Design<br />        a - </span><span style="line-height: 150%">基本动画效果</span><span style="line-height: 150%"><br />        b - </span><span style="line-height: 150%">复杂的交互体系设计，了解第三方</span><span style="line-height: 150%">swf</span><span style="line-height: 150%">辅助设计软件</span><span style="line-height: 150%"><br />        c - </span><span style="line-height: 150%">复杂的交互体系设计以及较强的对各类外埠资源（</span><span style="line-height: 150%">PNG</span><span style="line-height: 150%">、</span><span style="line-height: 150%">JPG</span><span style="line-height: 150%">、</span><span style="line-height: 150%">MP3</span><span style="line-height: 150%">、</span><span style="line-height: 150%">WAV</span><span style="line-height: 150%">等）的整合能力。精通部分第三方辅助设计软件（</span><span style="line-height: 150%">AE</span><span style="line-height: 150%">、</span><span style="line-height: 150%">SwishMax</span><span style="line-height: 150%">、</span><span style="line-height: 150%">Swift3D</span><span style="line-height: 150%">等）</span></li>    </ol>    </li>    <li style="text-align: left; line-height: 150%"><b><span style="line-height: 150%">【必备】</span></b><b><span style="line-height: 150%">Browser-side (Web Application)</span></b></li>    <li style="text-align: left; line-height: 150%">&nbsp;    <ol type="1">        <li style="text-align: left; line-height: 150%"><span style="line-height: 150%">XHTML/CSS<br />        a - </span><span style="line-height: 150%">基本的</span><span style="line-height: 150%">layout</span><span style="line-height: 150%">实现</span><span style="line-height: 150%"><br />        b - </span><span style="line-height: 150%">严格跨平台的</span><span style="line-height: 150%">layout</span><span style="line-height: 150%">实现以</span><span style="line-height: 150%"><br />        c - </span><span style="line-height: 150%">优雅的</span><span style="line-height: 150%">HTML code</span><span style="line-height: 150%">，尽可能符合标准并有</span><span style="line-height: 150%">SEO</span><span style="line-height: 150%">的考虑因素。在任何平台、浏览器下基本保持一致。不要求了解各种</span><span style="line-height: 150%">CSS</span><span style="line-height: 150%">的</span><span style="line-height: 150%">hacks</span><span style="line-height: 150%">，但要求知道遇到问题应该如何查阅资料以在第一时间内解决。能够为</span><span style="line-height: 150%">JavaScript</span><span style="line-height: 150%">开发人员提供最好操作的</span><span style="line-height: 150%">DOM</span><span style="line-height: 150%">结构，让</span><span style="line-height: 150%">JS</span><span style="line-height: 150%">开发人员在开发的时候认为</span><span style="line-height: 150%">&rdquo;</span><span style="line-height: 150%">一切都已经准备就绪了</span><span style="line-height: 150%">&rdquo;</span><span style="line-height: 150%">，而不是</span><span style="line-height: 150%">&rdquo;</span><span style="line-height: 150%">捉襟见肘</span><span style="line-height: 150%">&rdquo;</span><span style="line-height: 150%">。</span></li>        <li style="text-align: left; line-height: 150%"><span style="line-height: 150%">JavaScript/Ajax/DOM<br />        a - </span><span style="line-height: 150%">基本的</span><span style="line-height: 150%">DOM</span><span style="line-height: 150%">操作，了解</span><span style="line-height: 150%">AJAX</span><span style="line-height: 150%">，可以实现数据通信</span><span style="line-height: 150%"><br />        b - </span><span style="line-height: 150%">基本的</span><span style="line-height: 150%">DOM</span><span style="line-height: 150%">操作，能写高效率的</span><span style="line-height: 150%">OOP</span><span style="line-height: 150%">代码，以降低维护成本</span><span style="line-height: 150%"><br />        c - </span><span style="line-height: 150%">基于需求，进行不同的开发，选择合适的框架，做到代码效率最高，用户体验最好，代码下载量最小，并且可以在单独甚至更多产品线中最大限度重用代码</span></li>        <li style="text-align: left; line-height: 150%"><span style="line-height: 150%">Flash Developement<br />        a - </span><span style="line-height: 150%">基于</span><span style="line-height: 150%">Timeline</span><span style="line-height: 150%">的</span><span style="line-height: 150%">ActionScript</span><span style="line-height: 150%">操作，能实现简单交互</span><span style="line-height: 150%"><br />        b - </span><span style="line-height: 150%">掌握</span><span style="line-height: 150%">a</span><span style="line-height: 150%">外，能实现数据层通信（与服务器以及本地</span><span style="line-height: 150%">SharedObject</span><span style="line-height: 150%">）</span><span style="line-height: 150%"><br />        c - </span><span style="line-height: 150%">精通</span><span style="line-height: 150%">AS1-3</span><span style="line-height: 150%">，能根据需求进行各类</span><span style="line-height: 150%">RIA</span><span style="line-height: 150%">开发。无论是要求支持</span><span style="line-height: 150%">FlashPlayer8</span><span style="line-height: 150%">的，还是</span><span style="line-height: 150%">FlashPlayer9</span><span style="line-height: 150%">的，都能做到开发效率最高、灵活性最大（比如对</span><span style="line-height: 150%">HTML</span><span style="line-height: 150%">层的接口设计，等等）。</span></li>    </ol>    </li>    <li style="text-align: left; line-height: 150%"><b><span style="line-height: 150%">【必备】</span></b><b><span style="line-height: 150%">Client-side (Desktop Application)</span></b>    <ol type="1">        <li style="text-align: left; line-height: 150%"><span style="line-height: 150%">Apollo<br />        a - </span><span style="line-height: 150%">产品级的封装，基本技术了解（如何打包、如何加入</span><span style="line-height: 150%">HTML</span><span style="line-height: 150%">和</span><span style="line-height: 150%">JavaScript</span><span style="line-height: 150%">等）</span><span style="line-height: 150%"><br />        b - </span><span style="line-height: 150%">掌握</span><span style="line-height: 150%">a</span><span style="line-height: 150%">的同时，能利用</span><span style="line-height: 150%">Apollo</span><span style="line-height: 150%">的</span><span style="line-height: 150%">API</span><span style="line-height: 150%">独立设计、开发</span><span style="line-height: 150%">OS</span><span style="line-height: 150%">的文件</span><span style="line-height: 150%">I/O</span><span style="line-height: 150%">功能。</span><span style="line-height: 150%"><br />        c - </span><span style="line-height: 150%">掌握基本技能的同时，对</span><span style="line-height: 150%">&rdquo;3D</span><span style="line-height: 150%">概念体系</span><span style="line-height: 150%">&rdquo;</span><span style="line-height: 150%">有所认知。这里</span><span style="line-height: 150%">&rdquo;3D&rdquo;</span><span style="line-height: 150%">即：</span><span style="line-height: 150%">Design</span><span style="line-height: 150%">（设计）、</span><span style="line-height: 150%">Development</span><span style="line-height: 150%">（开发）、</span><span style="line-height: 150%">Deploy</span><span style="line-height: 150%">（产品部署）。能用</span><span style="line-height: 150%">Apollo </span></li>        <li style="text-align: left; line-height: 150%"><span style="line-height: 150%">Windows Presentation Foundation</span><span style="line-height: 150%">、</span><span style="line-height: 150%">WPF/E</span><span style="line-height: 150%">（</span><span style="line-height: 150%">Silverlight</span><span style="line-height: 150%">）</span><span style="line-height: 150%"><br />        </span><span style="line-height: 150%">（待定，欢迎补充）</span></li>    </ol>    </li>    <li style="text-align: left; line-height: 150%"><b><span style="line-height: 150%">【增补】</span></b><b><span style="line-height: 150%">Server-side</span></b><span style="line-height: 150%">（修改：经考虑，这个技能不参与评级）</span><span style="line-height: 150%"><br />    </span><span style="line-height: 150%">本来列举了</span><span style="line-height: 150%">&rdquo;1</span><span style="line-height: 150%">、</span><span style="line-height: 150%">Server</span><span style="line-height: 150%">端简单的技术、脚本</span><span style="line-height: 150%">&rdquo;</span><span style="line-height: 150%">和</span><span style="line-height: 150%">&rdquo;2</span><span style="line-height: 150%">、</span><span style="line-height: 150%">MediaServer</span><span style="line-height: 150%">（</span><span style="line-height: 150%">Red5</span><span style="line-height: 150%">）接口</span><span style="line-height: 150%">&rdquo;</span><span style="line-height: 150%">作为</span><span style="line-height: 150%">&rdquo;<b>Web</b></span><b><span style="line-height: 150%">前端工程师技能列表</span></b><span style="line-height: 150%">&ldquo;</span><span style="line-height: 150%">的一种（服务器、数据逻辑层技能的）评判标准。但似乎很多朋友对于前端工程师是否应该掌握</span><span style="line-height: 150%">Server</span><span style="line-height: 150%">端技能的必要性表示怀疑。确实，要掌握好上述的展现层技能不是意见容易的事情，而且前端工程师的确非常辛苦。但是，站在另一方面来说，辛苦的原因是什么，我不知道在你日夜奋战</span><span style="line-height: 150%">div+CSS</span><span style="line-height: 150%">的时候思考过没有。就我的经验，前端的辛苦在于以下几个方面：</span></li></ul><div style="text-align: left; line-height: 150%" align="left">&nbsp;</div><ul type="disc">    <ol type="1">        <li style="text-align: left; line-height: 150%"><b><span style="line-height: 150%">重复劳动多</span></b><span style="line-height: 150%">，大量的</span><span style="line-height: 150%">div+css</span><span style="line-height: 150%">都是重复的，即便可以复制粘贴，但几千行的</span><span style="line-height: 150%">div</span><span style="line-height: 150%">海洋中去寻找一个入口恐怕都非常痛苦</span></li>        <li style="text-align: left; line-height: 150%"><b><span style="line-height: 150%">需求变更多</span></b><span style="line-height: 150%">，往往你折腾几个小时终于把跨平台问题解决好了，而且在</span><span style="line-height: 150%">IE6</span><span style="line-height: 150%">、</span><span style="line-height: 150%">7</span><span style="line-height: 150%">和</span><span style="line-height: 150%">Firefox</span><span style="line-height: 150%">下面都能显示同样的效果了，甚至连</span><span style="line-height: 150%">JavaScript</span><span style="line-height: 150%">交互都已经快搞定了。突然上面说需求要变。这无疑是莫大的痛苦。</span></li>    </ol></ul><div style="text-align: left; line-height: 150%" align="left"><span style="line-height: 150%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="line-height: 150%">也许表面上看，这跟</span><span style="line-height: 150%">Server</span><span style="line-height: 150%">端技能无关，但我觉得有好的</span><span style="line-height: 150%">Server</span><span style="line-height: 150%">端的意识，一定会有所帮助（当然不可能解决所有的问题）。毕竟信息结构和数据库是密切相关的，而</span><span style="line-height: 150%">Server</span><span style="line-height: 150%">是连接数据库的唯一渠道（至少大多数</span><span style="line-height: 150%">B/S</span><span style="line-height: 150%">应用是如此）。掌握</span><span style="line-height: 150%">Server</span><span style="line-height: 150%">端的基本技能，对于同逻辑层开发人员设计接口是非常重要的。而且</span><span style="line-height: 150%">HTML</span><span style="line-height: 150%">表现层在开发时与数据的分离，也与</span><span style="line-height: 150%">Server</span><span style="line-height: 150%">端的各种模板技术有关。例如</span><span style="line-height: 150%">PHP</span><span style="line-height: 150%">中的</span><span style="line-height: 150%">Smarty</span><span style="line-height: 150%">模板（我曾经用的）、</span><span style="line-height: 150%">jsp</span><span style="line-height: 150%">的</span><span style="line-height: 150%">model2</span><span style="line-height: 150%">概念等等。</span><span style="line-height: 150%">HTML</span><span style="line-height: 150%">结构如何设计，如何让</span><span style="line-height: 150%">HTML</span><span style="line-height: 150%">重用，甚至在</span><span style="line-height: 150%">HTML</span><span style="line-height: 150%">层进行</span><span style="line-height: 150%">OOP</span><span style="line-height: 150%">的开发（我现在在新产品线中设计的前端开发流程），都需要</span><span style="line-height: 150%">Server</span><span style="line-height: 150%">端的支持。最起码，你要告诉</span><span style="line-height: 150%">php</span><span style="line-height: 150%">程序员你需要什么。如果你完全对</span><span style="line-height: 150%">PHP</span><span style="line-height: 150%">一无所知的话，那也无从谈起了。</span><span style="line-height: 150%"><br /></span><span style="line-height: 150%">此外，对于创业团队，往往人手非常有限。为了让运营成本降到最低，所有的技术人员都有义务对</span><span style="line-height: 150%">Server</span><span style="line-height: 150%">端技术有所了解。如果为了修改一个网页的标题还要跑去喊</span><span style="line-height: 150%">PHP</span><span style="line-height: 150%">程序员连接</span><span style="line-height: 150%">Remote Server</span><span style="line-height: 150%">的话，那实在是增加了整个公司的运营成本。</span><span style="line-height: 150%"><br /></span><span style="line-height: 150%">总结：我认为，可以不了解技术细节，但应该知道原理，最好能掌握一两套设计思想（毕竟数据逻辑都在这里走，光看</span><span style="line-height: 150%">HTML</span><span style="line-height: 150%">和</span><span style="line-height: 150%">JavaScript</span><span style="line-height: 150%">，对人的见识还是有局限的，这种局限限制了我自己很久的时间），那将是一比宝贵的财富。</span></div><ul type="disc">    <li style="text-align: left; line-height: 150%"><b><span style="line-height: 150%">【增补】</span></b><b><span style="line-height: 150%">Mobile-side</span></b><span style="line-height: 150%">（不参与评级）</span>    <ol type="1">        <li style="text-align: left; line-height: 150%"><span style="line-height: 150%">Flashlite<br />        </span><span style="line-height: 150%">（待定，欢迎补充）</span></li>        <li style="text-align: left; line-height: 150%"><span style="line-height: 150%">Java</span><span style="line-height: 150%">？</span><span style="line-height: 150%"><br />        </span><span style="line-height: 150%">（待定，欢迎补充）</span></li>    </ol>    </li></ul><div style="text-align: left; line-height: 150%" align="left"><span style="line-height: 150%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="line-height: 150%">看到很多朋友留言说前端工程师没前途，我在想，同时掌握移动设备的技能是否也是拓展前途的一个必要性？这里再多说几句，关于技术人员的前途，目前在国内确实得用</span><span style="line-height: 150%">&rdquo;</span><span style="line-height: 150%">惨淡</span><span style="line-height: 150%">&rdquo;</span><span style="line-height: 150%">来形容。浮躁的氛围让技术人才往往过早放弃了自己的技术生涯，而尔虞我诈的整体道德水平也让单纯的技术人员痛不欲生（我身边太多了，恩，不说具体细节了，呵呵）。</span></div><div style="text-align: left; line-height: 150%" align="left"><span style="line-height: 150%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="line-height: 150%">作为一个技术人员，开发人员，在保持纯粹地敬业心态（这是前提，这么没有，啥也别谈）外，更要学会如何保护自己，如何壮大自身，社会不会同情你，只有你自己才能保护你自己。</span></div><div style="text-align: left; line-height: 150%" align="left"><span style="line-height: 150%"><a title="【更新整理】Web前端工程师技能列表" href="http://www.awflasher.com/blog/archives/906"><font color="#0000ff">http://www.awflasher.com/blog/archives/906</font></a></span></div><div style="text-align: left; line-height: 150%" align="left">&nbsp;</div><div>&nbsp;</div>]]></description><category>用户体验</category><comments>http://www.zhangmeigong.cn/post/211.html#comment</comments><wfw:comment>http://www.zhangmeigong.cn/</wfw:comment><wfw:commentRss>http://www.zhangmeigong.cn/feed.asp?cmt=211</wfw:commentRss><trackback:ping>http://www.zhangmeigong.cn/cmd.asp?act=tb&amp;id=211&amp;key=f7faf1f5</trackback:ping></item></channel></rss>

