<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>haojii &#187; WebDev</title>
	<atom:link href="http://www.haojii.com/category/webdev/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.haojii.com</link>
	<description>一个专注于技术的IT男</description>
	<lastBuildDate>Thu, 19 Apr 2012 07:58:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>如何测试DWR对象?</title>
		<link>http://www.haojii.com/2011/04/how-to-test-dwr-beans/</link>
		<comments>http://www.haojii.com/2011/04/how-to-test-dwr-beans/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 08:30:23 +0000</pubDate>
		<dc:creator>Jacky</dc:creator>
				<category><![CDATA[JavaEE]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[coverage]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[unit_test]]></category>

		<guid isPermaLink="false">http://www.haojii.com/?p=529</guid>
		<description><![CDATA[1. Use EasyMock 2. Use spring org.springframework.mock.web.* Example code of testcase: Another Note: Coverage Tool<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F08%2Flong-time-no-java-an-interview%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Fhow-to-test-dwr-beans%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">久疏战阵</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2009%2F12%2Fwhy-el-use-java-property-instead-of-field%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Fhow-to-test-dwr-beans%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为什么EL表达式里的属性名不是javabean的字段呢？</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fchoose-a-java-web-framework%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Fhow-to-test-dwr-beans%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">JavaWeb开发的技术选型</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fwhat-is-ajp%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Fhow-to-test-dwr-beans%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">What is AJP?</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>1. Use EasyMock</p>
<pre class="brush: java; title: ; notranslate">
HttpServletRequest request = EasyMock.createMock(HttpServletRequest.class);
HttpSession session = EasyMock.createMock(HttpSession.class);
EasyMock.expect(request.getSession()).andStubReturn(session);
</pre>
<p>2. Use spring org.springframework.mock.web.*</p>
<pre class="brush: java; title: ; notranslate">
HttpServletRequest request = new MockHttpServletRequest();
HttpServletResponse response = new MockHttpServletResponse();
HttpSession session = (MockHttpSession)request.getSession();
MockServletContext context = new MockServletContext();
MockServletConfig config = new MockServletConfig(context);
</pre>
<p> Example code of testcase:</p>
<pre class="brush: java; title: ; notranslate">
import org.directwebremoting.Container;
import org.directwebremoting.WebContextFactory;
import org.directwebremoting.impl.DefaultWebContextBuilder;
import org.easymock.EasyMock;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockServletConfig;
import org.springframework.mock.web.MockServletContext;

@BeforeClass
public static void setUpBeforeClass() throws Exception {

/*....code of using easymock or spring code to mock request, reponse, config, context...*/

Container container = EasyMock.createMock(Container.class);
EasyMock.replay(container);

DefaultWebContextBuilder builder = new DefaultWebContextBuilder();
builder.set(request, response, config, context, container);

WebContextFactory.setWebContextBuilder(builder);
}
</pre>
<p>Another Note:<br />
<a href="http://www.eclemma.org/">Coverage Tool</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F08%2Flong-time-no-java-an-interview%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Fhow-to-test-dwr-beans%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">久疏战阵</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2009%2F12%2Fwhy-el-use-java-property-instead-of-field%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Fhow-to-test-dwr-beans%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为什么EL表达式里的属性名不是javabean的字段呢？</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fchoose-a-java-web-framework%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Fhow-to-test-dwr-beans%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">JavaWeb开发的技术选型</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fwhat-is-ajp%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Fhow-to-test-dwr-beans%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">What is AJP?</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.haojii.com/2011/04/how-to-test-dwr-beans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>placehold.it</title>
		<link>http://www.haojii.com/2011/01/placehold-it/</link>
		<comments>http://www.haojii.com/2011/01/placehold-it/#comments</comments>
		<pubDate>Fri, 28 Jan 2011 04:47:52 +0000</pubDate>
		<dc:creator>Jacky</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[用户体验]]></category>
		<category><![CDATA[web开发]]></category>

		<guid isPermaLink="false">http://www.haojii.com/?p=483</guid>
		<description><![CDATA[placehold.it 是一个为你排版简易创建占位符的服务器，这个服务很简单，很酷 Note: 300&#215;200标识图片大小; URL follow的格式：http://placehold.it/占位符大小/背景色/前景色<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fplacehold-it%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为iPhone优化网页的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F09%2Fedianping-user-experience-analyse%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fplacehold-it%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">E店评的用户体验分析</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fplacehold-it%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS分割背景图片的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fplacehold-it%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">炫酷CSS超链接按钮一</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>placehold.it 是一个为你排版简易创建占位符的服务器，这个服务很简单，很酷</p>
<pre class="brush: xml; title: ; notranslate">

&lt;img src=&quot;http://placehold.it/300x200&amp;text=I+am+a+300x200+place+holder&quot; alt=&quot;300x200&quot; /&gt; 会为你生成如下图片占位符
</pre>
<p><img src="http://placehold.it/300x200&amp;text=I+am+a+300x200+place+holder" alt="300x200" /></p>
<pre class="brush: xml; title: ; notranslate">

&lt;img src=&quot;http://placehold.it/300x200/09f/ffffff&quot; alt=&quot;300x200 with green background and white font&quot; /&gt; 会为你生成如下图片占位符
</pre>
<p><img src="http://placehold.it/300x200/09f/ffffff" alt="300x200 with green background and white font" /></p>
<pre class="brush: xml; title: ; notranslate">

&lt;img src=&quot;http://placehold.it/300x200/09f/ffffff&amp;text=green+bg+white+fg&quot; alt=&quot;300x200 with green background and white font&quot; /&gt;

会为你生成如下图片占位符
</pre>
<p><img src="http://placehold.it/300x200/09f/ffffff&amp;text=green+bg+white+fg" alt="300x200 with green background and white font" /></p>
<p><span style="color: #ff0000;">Note: </span></p>
<p><span style="color: #ff0000;">300&#215;200标识图片大小; </span></p>
<p><span style="color: #ff0000;">URL follow的格式：http://placehold.it/占位符大小/背景色/前景色</span></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fplacehold-it%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为iPhone优化网页的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F09%2Fedianping-user-experience-analyse%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fplacehold-it%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">E店评的用户体验分析</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fplacehold-it%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS分割背景图片的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fplacehold-it%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">炫酷CSS超链接按钮一</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.haojii.com/2011/01/placehold-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaWeb开发的技术选型</title>
		<link>http://www.haojii.com/2011/01/choose-a-java-web-framework/</link>
		<comments>http://www.haojii.com/2011/01/choose-a-java-web-framework/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 07:11:13 +0000</pubDate>
		<dc:creator>Jacky</dc:creator>
				<category><![CDATA[JavaEE]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[javaweb]]></category>

		<guid isPermaLink="false">http://www.haojii.com/?p=451</guid>
		<description><![CDATA[比较传统的方式有Struts1,Struts2,Spring Web MVC,这些技术相对成熟，web产品架构也基本上属于按部就班级别的，选用这个是大公司的正常做法基本没啥风险。 - Play! Framework 貌似是Java语言中出镜率最高的RoR框架，很大程度上都是模仿RoR。 Java脚本语言方面有Groovy（动态类型的） on Grails, Scala（静态类型的） on Lift，感觉都各有作为，Groovy更早出现在我们视野，Scala也异常迅猛感觉像是Java的未来。 大致读了一些文章，Play的评价都还不错，至少没丢RoR的脸。 玩得转Struts的人至少有足够的Servlet,JSP基本的能力，玩个RoR应该会发现开发更顺手吧。（RoR毕竟是号称full stack的框架。） 我下一步想花点时间体验一下用play完成一个简单的类似于struts action的task。 - Restful WebService 框架方面有两个讨论比较多的进入我的视线: Jersey   http://jersey.java.net/  Jersey is the open source, production quality, JAX-RS (JSR 311) Reference Implementation for building RESTful Web services. But, &#8230; <a href="http://www.haojii.com/2011/01/choose-a-java-web-framework/">继续阅读 <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F08%2Flong-time-no-java-an-interview%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fchoose-a-java-web-framework%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">久疏战阵</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2009%2F12%2Fwhy-el-use-java-property-instead-of-field%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fchoose-a-java-web-framework%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为什么EL表达式里的属性名不是javabean的字段呢？</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F05%2Fcode-snip%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fchoose-a-java-web-framework%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">空虚,贴一段代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Fhow-to-test-dwr-beans%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fchoose-a-java-web-framework%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">如何测试DWR对象?</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>比较传统的方式有Struts1,Struts2,Spring Web MVC,这些技术相对成熟，web产品架构也基本上属于按部就班级别的，选用这个是大公司的正常做法基本没啥风险。</p>
<p>-</p>
<p>Play! Framework 貌似是Java语言中出镜率最高的RoR框架，很大程度上都是模仿RoR。</p>
<p>Java脚本语言方面有Groovy（动态类型的） on Grails, Scala（静态类型的） on Lift，感觉都各有作为，Groovy更早出现在我们视野，Scala也异常迅猛感觉像是Java的未来。</p>
<p>大致读了一些文章，Play的评价都还不错，至少没丢RoR的脸。</p>
<p>玩得转Struts的人至少有足够的Servlet,JSP基本的能力，玩个RoR应该会发现开发更顺手吧。（RoR毕竟是号称full stack的框架。）</p>
<p>我下一步想花点时间体验一下用play完成一个简单的类似于struts action的task。</p>
<p>-</p>
<p>Restful WebService 框架方面有两个讨论比较多的进入我的视线:</p>
<p>Jersey   <a href="http://jersey.java.net/">http://jersey.java.net/</a> </p>
<p>Jersey is the open source, production quality, <a href="http://jsr311.dev.java.net/nonav/releases/1.1/index.html">JAX-RS</a> (JSR 311) Reference Implementation for building RESTful Web services. But, it is also more than the Reference Implementation.</p>
<p>Restlet  <a href="http://www.restlet.org/">http://www.restlet.org/</a><br />
Do you want to blend your web services, web sites and web clients into unified web applications exposing and consuming RESTful web APIs?<br />
 </p>
<p>Stackoverflow上的一个讨论：<a href="http://stackoverflow.com/questions/1710199/which-is-the-best-java-rest-api-restlet-or-jersey">Which is the best Java REST API &#8211; Restlet or Jersey? </a></p>
<p>Google search Jersey vs Restlet的结果也显示Jersey更热门，八成是JAX-RS规范的缘故吧。</p>
<p>所以简单点决定的话，我倾向于评估一下Jersey是不是符合我们产品需要提供WebService/API这个需求。</p>
<p>-</p>
<p>其实不管选择哪个，对开发人员来说都可以玩的转的，在一家大公司多数时候技术的选型不得不考虑到一些其他非技术的因素，如何说服别人这才是最难的。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F08%2Flong-time-no-java-an-interview%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fchoose-a-java-web-framework%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">久疏战阵</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2009%2F12%2Fwhy-el-use-java-property-instead-of-field%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fchoose-a-java-web-framework%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为什么EL表达式里的属性名不是javabean的字段呢？</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F05%2Fcode-snip%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fchoose-a-java-web-framework%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">空虚,贴一段代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Fhow-to-test-dwr-beans%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F01%2Fchoose-a-java-web-framework%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">如何测试DWR对象?</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.haojii.com/2011/01/choose-a-java-web-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>link的地址以斜线开头完全没有道理啊</title>
		<link>http://www.haojii.com/2010/08/never-start-your-link-href-with-slash/</link>
		<comments>http://www.haojii.com/2010/08/never-start-your-link-href-with-slash/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 05:49:13 +0000</pubDate>
		<dc:creator>Jacky</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[小问题]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[web开发]]></category>

		<guid isPermaLink="false">http://www.haojii.com/?p=376</guid>
		<description><![CDATA[在内部搭一个类stackoverflow的系统，选了个基于django的开源的osqa，部署的时候陆陆续续发现源码里有点小问题，比如用户相关的很多link是这样写的: 这么搞的话link就指向了服务器的documentRoot，但是我不会把osqa这个应用直接挂在根域名下，这样的hard code我觉得挺愚蠢的。 其实同样的问题也存在我们的jsp里面，这个编程习惯不好，要改正其实也不难，手工做的话可以取得app的rootPath就行了，或者用url标签来帮我们自动搞定。（django&#38;jsp都有的） 另一个Note：osqa第一次装的时候会把配置信息写到forum_keyvalue表里面，后面修改上传路径等的配置没有用，必须到数据库修改。 Something more: Larry wrote 2 useful CSS related posts: CSS – small tips (设置图像最大宽度，打印分页) CSS – sprites, manage images (图像合并切割) END<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F08%2Fnever-start-your-link-href-with-slash%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS分割背景图片的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F08%2Fnever-start-your-link-href-with-slash%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">炫酷CSS超链接按钮一</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F08%2Fnever-start-your-link-href-with-slash%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS的link和@import的区别</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F08%2Fnever-start-your-link-href-with-slash%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为iPhone优化网页的技巧</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>在内部搭一个类stackoverflow的系统，选了个基于django的开源的osqa，部署的时候陆陆续续发现源码里有点小问题，比如用户相关的很多link是这样写的:</p>
<pre class="brush: xml; title: ; notranslate">

&lt;a href=&quot;/users/{{ user.id }}/{{ user.username|slugify }}/&quot;&gt;{% gravatar user 32 %}&lt;/a&gt;
</pre>
<p>这么搞的话link就指向了服务器的documentRoot，但是我不会把osqa这个应用直接挂在根域名下，这样的hard code我觉得挺愚蠢的。</p>
<p>其实同样的问题也存在我们的jsp里面，这个编程习惯不好，要改正其实也不难，手工做的话可以取得app的rootPath就行了，或者用url标签来帮我们自动搞定。（django&amp;jsp都有的）</p>
<p>另一个Note：osqa第一次装的时候会把配置信息写到forum_keyvalue表里面，后面修改上传路径等的配置没有用，必须到数据库修改。</p>
<pre class="brush: sql; title: ; notranslate">

mysql&gt; update forum_keyvalue set value=&quot;S'/upfiles/logo.png'
    &quot;&gt; p0
    &quot;&gt; .&quot; where id=26;

	mysql&gt; update forum_keyvalue set value=&quot;S'/var/lib/osqa/forum/upfiles'
    &quot;&gt; p0
    &quot;&gt; .&quot; where id=33;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql&gt; select * from forum_keyvalue where id=33;
+----+----------------+-------------------------------------+
| id | key            | value                               |
+----+----------------+-------------------------------------+
| 33 | UPFILES_FOLDER | S'/var/lib/osqa/forum/upfiles'
p0
. |
+----+----------------+-------------------------------------+
</pre>
<p>Something more:<br />
Larry wrote 2 useful CSS related posts:<br />
<a title="CSS – small tips" href="http://codeslife.com/?p=164">CSS –  small tips</a> (设置图像最大宽度，打印分页)</p>
<p><a title="CSS – sprites, manage  images" href="http://codeslife.com/?p=159">CSS – sprites, manage images</a> (图像合并切割)</p>
<p>END</p>
]]></content:encoded>
			<wfw:commentRss>http://www.haojii.com/2010/08/never-start-your-link-href-with-slash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cool demo with jQuery plugin FancyBox</title>
		<link>http://www.haojii.com/2010/05/cool-demo-with-jquery-plugin-fancybox/</link>
		<comments>http://www.haojii.com/2010/05/cool-demo-with-jquery-plugin-fancybox/#comments</comments>
		<pubDate>Fri, 21 May 2010 07:40:25 +0000</pubDate>
		<dc:creator>Jacky</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[web开发]]></category>

		<guid isPermaLink="false">http://www.haojii.com/?p=307</guid>
		<description><![CDATA[$(document).ready(function() { $("#login").fancybox({ 'padding' : 0, 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none' }); $("#flash").fancybox({ 'padding' : 0, 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none' }); }); 猛击我查看效果 A Flash Demo 代码如下：]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script></p>
<p><script type="text/javascript" src="http://www.haojii.com/webdev/fancyboxdemo/fancybox/jquery.mousewheel-3.0.2.pack.js"></script></p>
<p><script type="text/javascript" src="http://www.haojii.com/webdev/fancyboxdemo/fancybox/jquery.fancybox-1.3.1.js"></script></p>
<link rel="stylesheet" type="text/css" href="http://www.haojii.com/webdev/fancyboxdemo/fancybox/jquery.fancybox-1.3.1.css" media="screen" />
<p><script type="text/javascript">
		$(document).ready(function() {
			$("#login").fancybox({
				'padding'			: 0,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});
			$("#flash").fancybox({
				'padding'			: 0,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});
		});
	</script></p>
<div>
<h1><a id="login" href="#register-form" title="This is the title for register form">猛击我查看效果</a></h1>
<div style="display:none">
<p><!-- Registration -->  </p>
<div id="register-form" style="width: 500px; height: 300px; margin:auto;">
<h1><a id="flash" href="http://www.adobe.com/jp/events/cs3_web_edition_tour/swfs/perform.swf">A Flash Demo</a></h1>
</p></div>
</p></div>
<p><!-- /Registration -->  </p>
</div>
<p>代码如下：</p>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-1.4.2.min.js&quot;&gt;&lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.haojii.com/webdev/fancyboxdemo/fancybox/jquery.mousewheel-3.0.2.pack.js&quot;&gt;&lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.haojii.com/webdev/fancyboxdemo/fancybox/jquery.fancybox-1.3.1.js&quot;&gt;&lt;/script&gt;

&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.haojii.com/webdev/fancyboxdemo/fancybox/jquery.fancybox-1.3.1.css&quot; media=&quot;screen&quot; /&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
		$(document).ready(function() {
			$(&quot;#login&quot;).fancybox({
				'padding'			: 0,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});
			$(&quot;#flash&quot;).fancybox({
				'padding'			: 0,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});
		});
	&lt;/script&gt;

&lt;div&gt;
&lt;h1&gt;&lt;a id=&quot;login&quot; href=&quot;#register-form&quot; title=&quot;This is the title for register form&quot;&gt;猛击我吧!&lt;/a&gt;&lt;/h1&gt;
    &lt;div style=&quot;display:none&quot;&gt; 

&lt;!-- Registration --&gt;
		&lt;div id=&quot;register-form&quot; style=&quot;width: 500px; height: 300px; margin:auto;&quot;&gt;
			&lt;h1&gt;&lt;a id=&quot;flash&quot; href=&quot;http://www.adobe.com/jp/events/cs3_web_edition_tour/swfs/perform.swf&quot;&gt;A Flash Demo&lt;/a&gt;&lt;/h1&gt;
		&lt;/div&gt;
   &lt;/div&gt;
&lt;!-- /Registration --&gt;  

&lt;/div&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.haojii.com/2010/05/cool-demo-with-jquery-plugin-fancybox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>为iPhone优化网页的技巧</title>
		<link>http://www.haojii.com/2010/02/optimize-web-pages-for-iphone/</link>
		<comments>http://www.haojii.com/2010/02/optimize-web-pages-for-iphone/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 10:05:57 +0000</pubDate>
		<dc:creator>Jacky</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[web开发]]></category>
		<category><![CDATA[技巧]]></category>

		<guid isPermaLink="false">http://www.haojii.com/?p=213</guid>
		<description><![CDATA[为iPhone优化网页的技巧,为了使得网页看上去更像native的程序，我们需要对网页进行一些优化

本文包含一些小的技巧：
1. 如何隐藏iPhone Safari的地址栏
2. 如何设置网页的桌面快捷方式图标
3. 如何为网页设置iPhone的样式
4. 如何在网页中检测屏幕的方向
5. 如何在网页中检测当前的位置
 <a href="http://www.haojii.com/2010/02/optimize-web-pages-for-iphone/">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>为了使得网页看上去更像native的程序，我们需要对网页进行一些优化</p>
<p><a href="http://www.haojii.com/webdev/iphone/">使用iPhone访问本文的测试页面</a></p>
<p>本文包含一些小的技巧：<br />
1. 如何隐藏iPhone Safari的地址栏<br />
2. 如何设置网页的桌面快捷方式图标<br />
3. 如何为网页设置iPhone的样式<br />
4. 如何在网页中检测屏幕的方向<br />
5. 如何在网页中检测当前的位置</p>
<p>为iPhone优化网页，最需要了解的应该是下面这个属性<br />
viewport: 可见窗口</p>
<p>可见窗口在iPhone Safari上和桌面Safari略有不同，iPhone上默认没有滚动条，默认的实际的可见大小在竖屏状态下，如下图是320*356，地址栏占据了60像素的高度，稍后我们有办法将其隐藏，得以使用这宝贵的60像素。</p>
<p>iPhone的Safari在显示传统的web网页时（未做优化的网页），viewport会被设置成显示网页宽度的980像素，即在320*356的大小内显示原网页980像素的内容，做了适当的缩放等调整。</p>
<p><a href="http://www.haojii.com/wp-content/uploads/iphone-viewport.png"><img class="aligncenter size-full wp-image-214" title="iphone-viewport" src="http://www.haojii.com/wp-content/uploads/iphone-viewport.png" alt="" width="780" height="600" /></a></p>
<p>所以我们做网页优化的时候，可以通过设置这个meta属性，更多细节可以参考： “Safari Web Content Guide.pdf”</p>
<pre class="brush: xml; title: ; notranslate">
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width,height=device-height, initial-scale=1.0, user-scalable=no&quot;/&gt;
</pre>
<p>width=device-width, //设备宽度</p>
<p>height=device-height, //设备高度</p>
<p>initial-scale=1.0, //初始的缩放比例</p>
<p>user-scalable=no //是否允许用户缩放</p>
<h3>小技巧</h3>
<h4>1. 如何隐藏iPhone Safari的地址栏</h4>
<p>设置这个属性(文档里面说有用，但是好像不太成功)</p>
<pre class="brush: xml; title: ; notranslate">&lt;meta name=&quot;apple-mobile-web-app-capable&quot; content=&quot;yes&quot; /&gt;</pre>
<p>还有一种办法，页面加载完成之后滚动窗口，这个确实有效，唯一要注意的是页面高度必须够长，我一般设成device-height就没问题了:</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
addEventListener(&quot;load&quot;, function() { setTimeout(hideURLbar, 0); }, false);

function hideURLbar(){
window.scrollTo(0,1);
}
&lt;/script&gt;
</pre>
<h4>2. 如何设置网页的桌面快捷方式图标</h4>
<p>这个其实不算技巧，只是从Apple文档里找到这一项罢了</p>
<pre class="brush: xml; title: ; notranslate">
&lt;link rel=&quot;apple-touch-icon&quot; href=&quot;apple-touch-icon.png&quot;/&gt;
&lt;link rel=&quot;apple-touch-startup-image&quot; href=&quot;startup.png&quot;/&gt;
</pre>
<p>第一行就是设置桌面快捷方式图标的，图标必须是57*57像素的文件，不需要自己做圆角和高亮效果，系统会自动帮你搞定这个<br />
放在网页根目录会作用于下面的全部网页，当然也可以为每个页面设置单独的图标</p>
<p>第二行是设置启动画面（没看到成功效果）</p>
<h4>3. 如何为网页设置iPhone的样式</h4>
<p>这个是CSS media selector的一点小技巧</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!--[if !IE]&gt;--&gt;
&lt;link media=&quot;only screen and (max-device-width: 480px)&quot;
  rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;iphone.css&quot;/&gt;
&lt;!--&lt;![endif]--&gt;
</pre>
<h4>4. 如何在网页中检测屏幕的方向</h4>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
function updateOrientation()
{
	var displayStr = &quot;Orientation : &quot;;
	switch(window.orientation)
	{
	case 0:
		displayStr += &quot;Portrait&quot;;
		break;
	case -90:
		displayStr += &quot;Landscape (right, screen turned clockwise)&quot;;
		break;
	case 90:
		displayStr += &quot;Landscape (left, screen turned counterclockwise)&quot;;
		break;
	case 180:
		displayStr += &quot;Portrait (upside-down portrait)&quot;;
		break;
	}
	document.getElementById(&quot;output&quot;).innerHTML = displayStr;
}
&lt;/script&gt;
&lt;body onorientationchange=&quot;updateOrientation();&quot;&gt;
</pre>
<h4>5. 如何在网页中检测当前的位置</h4>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
navigator.geolocation.getCurrentPosition(showMap);
function showMap(position) {
	latitude = position.coords.latitude;
	longitude = position.coords.longitude;
	document.getElementById(&quot;latitude&quot;).innerHTML = latitude;
	document.getElementById(&quot;longitude&quot;).innerHTML = longitude;
}

//Register for location changes
var watchId = navigator.geolocation.watchPosition(scrollMap,handleError);

function scrollMap(position) {
	latitude = position.coords.latitude;
	longitude = position.coords.longitude;
	document.getElementById(&quot;latitude&quot;).innerHTML = &quot;scrollMap-&gt;&quot;+latitude;
	document.getElementById(&quot;longitude&quot;).innerHTML = &quot;scrollMap-&gt;&quot;+longitude;
}
function handleError(error) {
	document.getElementById(&quot;error&quot;).innerHTML = error;
}

function buttonClickHandler() {
	// Unregister when the user clicks a button
	navigator.geolocation.clearWatch(watchId);
}

&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;location&quot;&gt;
	latitude:&lt;p id=&quot;latitude&quot;&gt;null&lt;/p&gt;
	longitude:&lt;p id=&quot;longitude&quot;&gt;null&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
	&lt;input type=&quot;button&quot; value=&quot;clearWatch&quot; onclick=&quot;buttonClickHandler();&quot;/&gt;
&lt;/div&gt;
&lt;div id=&quot;error&quot;&gt;&lt;/div&gt;
&lt;/body&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.haojii.com/2010/02/optimize-web-pages-for-iphone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>炫酷CSS超链接按钮一</title>
		<link>http://www.haojii.com/2010/01/cool-css-button-1/</link>
		<comments>http://www.haojii.com/2010/01/cool-css-button-1/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 13:25:54 +0000</pubDate>
		<dc:creator>Jacky</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[web开发]]></category>

		<guid isPermaLink="false">http://www.haojii.com/?p=186</guid>
		<description><![CDATA[上一篇文章提到用CSS分割图片的技巧，例子中也展示了一个很漂亮的CSS按钮，今天在tutorialzine看到这篇教程 Sweet AJAX Tabs With jQuery 1.4 &#38; CSS3的按钮也很漂亮，把demo代码下载下来之后，看了一下也是用CSS定位分割图片的技巧做出来的，和上一篇文章中按钮实现略有不同，下面就来解析怎么做出如下的效果: Tab one &#160;&#160; &#160; Tab two &#160;&#160; Tab three &#160;&#160; Tab four &#160;&#160; 首先按钮的HTML代码, 这个按钮的图片由左中右三部分构成，两边的图片是做好了边框效果的，中间的图片可以无限扩展。即下图显示的效果（注：图像来源于tutorialzine原教程） 源图像是这样的，其实还分成了亮度有区别的上下两部分，使用上文中已经介绍过的CSS技巧达到鼠标移上去高亮的效果。 -&#62;-&#62;-&#62; 让我们来看看实现一个按钮核心的CSS代码: 然后是定义按钮size、边框、边距等的CSS代码:]]></description>
			<content:encoded><![CDATA[<p><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js" type="text/javascript"></script><script src="http://www.haojii.com/webdev/coolbutton1/loadcss.js" type="text/javascript"></script></p>
<p><a href="http://www.haojii.com/2010/01/css_background_image_positioning/">上一篇文章</a>提到用CSS分割图片的技巧，例子中也展示了一个很漂亮的CSS按钮，今天在tutorialzine看到这篇教程<a href="http://tutorialzine.com/2010/01/sweet-tabs-jquery-ajax-css/"> Sweet AJAX Tabs With jQuery 1.4 &amp; CSS3</a>的按钮也很漂亮，把demo代码下载下来之后，看了一下也是用CSS定位分割图片的技巧做出来的，和上一篇文章中按钮实现略有不同，下面就来解析怎么做出如下的效果:</p>
<div id="buttonContainer">
<a class="blue" href="#">Tab one <span class="left">&nbsp;</span><span class="right">&nbsp;</span><br />
<span id="overLine" style="background: none repeat scroll 0% 0% blue;">&nbsp;</span><br />
</a><br />
<a class="green" href="#">Tab two <span class="left">&nbsp;</span><span class="right">&nbsp;</span></a><br />
<a class="red" href="#">Tab three <span class="left">&nbsp;</span><span class="right">&nbsp;</span></a><br />
<a class="orange" href="#">Tab four <span class="left">&nbsp;</span><span class="right">&nbsp;</span></a>
</div>
<p><br/><br/><br/><br/><br/><br />
首先按钮的HTML代码,</p>
<pre class="brush: xml; title: ; notranslate">
&lt;a class=&quot;green&quot; href=&quot;#&quot;&gt;Tab two &lt;span class=&quot;left&quot;&gt;&lt;/span&gt;&lt;span class=&quot;right&quot;&gt;&lt;/span&gt;&lt;/a&gt;
</pre>
<p>这个按钮的图片由左中右三部分构成，两边的图片是做好了边框效果的，中间的图片可以无限扩展。即下图显示的效果（注：图像来源于tutorialzine原教程）</p>
<p><a href="http://www.haojii.com/wp-content/uploads/i32.png"><img class="aligncenter size-full wp-image-187" title="i32" src="http://www.haojii.com/wp-content/uploads/i32.png" alt="" width="620" height="260" /></a></p>
<p>源图像是这样的，其实还分成了亮度有区别的上下两部分，使用上文中已经介绍过的CSS技巧达到鼠标移上去高亮的效果。<br />
-&gt;<img src="http://www.haojii.com/webdev/coolbutton1/img/blue_left.png" alt="" />-&gt;<img src="http://www.haojii.com/webdev/coolbutton1/img/blue_mid.png" alt="" />-&gt;<img src="http://www.haojii.com/webdev/coolbutton1/img/blue_right.png" alt="" /></p>
<p>让我们来看看实现一个按钮核心的CSS代码:</p>
<pre class="brush: css; title: ; notranslate">
a.blue{background:url(img/blue_mid.png) repeat-x top center; color:#03426e;}
a.blue span.left{ background:url(img/blue_left.png) no-repeat left top;}
a.blue span.right{ background:url(img/blue_right.png) no-repeat right top;}
</pre>
<p>然后是定义按钮size、边框、边距等的CSS代码:</p>
<pre class="brush: css; title: ; notranslate">
a,a:visited{
	/* Styling the hyperlinks of the tabs as colorful buttons */
	float:left;
	font-size:18px;
	/* display:block allows for additinal CSS rules to take effect, such as paddings: */
	display:block;
	padding:7px 16px 1px;
	margin:4px 5px;
	height:29px;
	/* Giving positioning */
	position:relative;
	/* CSS3 text-shadow */
	text-shadow:1px 1px 1px #CCCCCC;
}
.left{
	/* The left span in the hyperlink */
	height:37px;
	left:0;
	position:absolute;
	top:0;
	width:10px;
}
.right{
	/* The right span in the hyperlink */
	height:37px;
	right:0;
	position:absolute;
	top:0;
	width:10px;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.haojii.com/2010/01/cool-css-button-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS分割背景图片的技巧</title>
		<link>http://www.haojii.com/2010/01/css_background_image_positioning/</link>
		<comments>http://www.haojii.com/2010/01/css_background_image_positioning/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 16:10:36 +0000</pubDate>
		<dc:creator>Jacky</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[web开发]]></category>

		<guid isPermaLink="false">http://www.haojii.com/?p=177</guid>
		<description><![CDATA[// 因为我也不是CSS高手，所以本文的目的是写清楚如何弄明白CSS中分割图片的技巧，说到分割其实并不是真正意义上的剪裁图片，只是已经流行多年了的一种CSS best practise，用一个拼接起来的大的图片资源替代加载多个小图片的一种方法，优点是节约页面的加载速度，不会出现有的图片能显示有的还在加载的情况，这个效果或者性能用firebug可以测试出来。 当然用这个技巧也要选对地方用才行，要是经常需要改动的图像用这个技术还是有点折腾的。 核心的属性是这个：background-position 参数值从w3schools找出来的 Property Values Value Description top left top center top right center left center center center right bottom left bottom center bottom right If you only specify one keyword, the second value will be &#8230; <a href="http://www.haojii.com/2010/01/css_background_image_positioning/">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><script src="http://www.google.com/jsapi"></script><script type="text/javascript">// <![CDATA[
                  google.load("jquery", "1.3.2");
// ]]&gt;</script></p>
<p><script src="http://www.haojii.com/webdev/cssdemo/loadcss.js" type="text/javascript"></script><br />
因为我也不是CSS高手，所以本文的目的是写清楚如何弄明白CSS中分割图片的技巧，说到分割其实并不是真正意义上的剪裁图片，只是已经流行多年了的一种CSS best practise，用一个拼接起来的大的图片资源替代加载多个小图片的一种方法，优点是节约页面的加载速度，不会出现有的图片能显示有的还在加载的情况，这个效果或者性能用firebug可以测试出来。</p>
<p>当然用这个技巧也要选对地方用才行，要是经常需要改动的图像用这个技术还是有点折腾的。</p>
<p>核心的属性是这个：<a href="http://www.w3schools.com/css/pr_background-position.asp" target="_blank"><code>background-position</code> </a>参数值从w3schools找出来的</p>
<h2>Property Values</h2>
<table border="1" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<th width="20%" align="left">Value</th>
<th width="70%" align="left">Description</th>
</tr>
<tr>
<td>top left<br />
top center<br />
top right<br />
center left<br />
center center<br />
center right<br />
bottom left<br />
bottom center<br />
bottom right</td>
<td>If you only specify one keyword, the second value will be “center”. Default value is: 0% 0%</td>
</tr>
<tr>
<td><em>x% y%</em></td>
<td>The first value is the horizontal position and the second value is the vertical. The top left corner is 0% 0%. The right bottom corner is 100% 100%. If you only specify one value, the other value will be 50%.</td>
</tr>
<tr>
<td><em>xpos ypos</em></td>
<td>The first value is the horizontal position and the second value is the vertical. The top left corner is 0 0. Units can be pixels (0px 0px) or any other <a href="http://www.w3schools.com/css/css_units.asp">CSS units</a>. If you only specify one value, the other value will be 50%. You can mix % and positions</td>
</tr>
<tr>
<td>inherit</td>
<td>Specifies that the setting of the background-position property should be inherited from the parent element</td>
</tr>
</tbody>
</table>
<p>这里有篇不错的文章描述的是下面这个例子，将原图竖着的1234显示成横着的4个盒子<br />
<a href="http://www.sitepoint.com/blogs/2007/07/05/css-using-percentages-in-background-image/" target="_blank">CSS: Using Percentages in Background-Image</a></p>
<hr />
<div class="box1">.box1</div>
<div class="box2">.box2</div>
<div class="box3">.box3</div>
<div class="box4">.box4</div>
<hr style="clear:both;"/>下面这个例子也是常用到的：<br />
鼠标移到按钮上，用稍微亮一点点的图片显示的悬停效果。<br />
用到的green.png原图： <img src="http://www.haojii.com/webdev/cssdemo/img/green.png" alt="green.png" /><br />
按钮的代码:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;a class=&quot;green&quot; href=&quot;#&quot;&gt;Green&lt;span&gt; &lt;/span&gt;&lt;/a&gt;
</pre>
<p>按钮的CSS:</p>
<pre class="brush: css; title: ; notranslate">
a {
	/* The section titles */
	display:block;
	font-size:21px;
	height:34px;
	overflow:hidden;
	padding:10px 20px 0;
	position:relative;
	width:200px;
}
a {
	text-decoration: none;
}
a:hover{
	/* Removing the inherited underline from the titles */
	text-decoration:none;
}
a span{
	/* This span acts as the right part of the section's background */
	height:44px;
	position:absolute;
	right:0;
	top:0;
	width:4px;
	display:block;
}
a.green{background:url(img/green.png) repeat-x top left; color:#436800;}
a.green span{ background:url(img/green.png) repeat-x top right;}
/* The hover effects */
a:hover{ background-position:bottom left;}
</pre>
<p>最重要的一行，鼠标移上去的时候设置图像的位置为bottom left，而下半部分的图像比上半部分亮一点。<br />
效果如下:</p>
<div id="demo1">
<p><a class="green" href="#">Green<span> </span></a></p>
<p><a class="orange" href="#">Orange<span> </span></a></p>
<p><a class="blue" href="#">Blue<span> </span></a></p>
<p><a class="red" href="#">Red<span> </span></a></p>
<p><a class="green2" href="#">from sprite.png<span> </span></a></p>
</div>
<p>最后一个按钮样式和第一个其实是一样的，只不过最后是从sprite.png加载过来的，我使用了<a href="http://cn.spritegen.website-performance.org/">CSS 图片拼合生成器</a>将四张图拼接起来了，然后再用CSS去定位。<br />
拼接完成之后的图：<img src="http://www.haojii.com/webdev/cssdemo/img/sprite.png" alt="sprite.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.haojii.com/2010/01/css_background_image_positioning/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>使用AJAX集成Gravatar头像到自己的评论系统</title>
		<link>http://www.haojii.com/2010/01/integrate-gravatar-for-comment-using-ajax/</link>
		<comments>http://www.haojii.com/2010/01/integrate-gravatar-for-comment-using-ajax/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 07:31:38 +0000</pubDate>
		<dc:creator>Jacky</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[comment]]></category>
		<category><![CDATA[gravatar]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.haojii.com/?p=148</guid>
		<description><![CDATA[无图无真相，点击下图可以去测试页面查看源码 Gravatar头像这玩意基本上凡事用wordpress的博客的用户都用笔墨介绍过，所以我就不废话了，不知道的自己google一下。 集成Gravatar头像的核心是构造一个图像的URL地址，Gravatar的最简单的头像URL地址是这样生成的 1. 用MD5Hash算法加密你的邮箱地址 2. 头像 URL= http://www.gravatar.com/avatar/+第一步加密后的值 当然Gravatar还提供了几个有意思的参数，如?d=monsterid加上这个参数，如果邮箱地址未在Gravatar注册过，则动态生成一个小怪兽的头像（例子：左图的右下头像） JavaScript的MD5Hash所幸也有人早就写过了，到这里下载一个。 现在我们需要关心的就是页面怎么写了，左图的评论表单是从wordpress里抠出来的，CSS我不是高手，简单的弄了下不至于太难看。 AJAX的标题有点噱头啦，但是在这个例子的基础上做成AJAX评论也只剩下一小步了。 其实测试页面值得一提的代码是这一段，用户输入完email地址之后，这个输入框失去焦点，这个时候我们动态加载其头像，这样一来用户体验能够得到明显提升，不要看是个小小的功能，有时候就是这些细节才抓住了你的目标客户。]]></description>
			<content:encoded><![CDATA[<p>无图无真相，<strong>点击下图可以去测试页面查看源码</strong></p>
<p><a href="http://www.haojii.com/webdev/gravatar/gravatar.html"><img class="size-medium wp-image-147 alignleft" title="gravatar_demo" src="http://www.haojii.com/wp-content/uploads/gravatar_demo-289x300.png" alt="" width="289" height="300" /></a> Gravatar头像这玩意基本上凡事用wordpress的博客的用户都用笔墨介绍过，所以我就不废话了，不知道的自己google一下。</p>
<p>集成Gravatar头像的核心是构造一个图像的URL地址，Gravatar的最简单的头像URL地址是这样生成的</p>
<p>1. 用MD5Hash算法加密你的邮箱地址</p>
<p>2. 头像 URL= http://www.gravatar.com/avatar/+第一步加密后的值</p>
<p>当然Gravatar还提供了几个<a href="http://en.gravatar.com/site/implement/url" target="_blank">有意思的参数</a>，如<strong>?d=monsterid</strong>加上这个参数，如果邮箱地址未在Gravatar注册过，则动态生成一个小怪兽的头像（例子：左图的右下头像）</p>
<p>JavaScript的MD5Hash所幸也有人早就写过了，到<a href="http://pajhome.org.uk/crypt/md5/" target="_blank">这里</a>下载一个。</p>
<p>现在我们需要关心的就是页面怎么写了，左图的评论表单是从wordpress里抠出来的，CSS我不是高手，简单的弄了下不至于太难看。</p>
<p>AJAX的标题有点噱头啦，但是在这个例子的基础上做成AJAX评论也只剩下一小步了。</p>
<p>其实测试页面值得一提的代码是这一段，用户输入完email地址之后，这个输入框失去焦点，这个时候我们动态加载其头像，这样一来用户体验能够得到明显提升，不要看是个小小的功能，有时候就是这些细节才抓住了你的目标客户。</p>
<pre class="brush: jscript; title: ; notranslate">
//jQuery的blur事件
(&quot;#email&quot;).blur(function(event){
//清空上一个头像
$(&quot;#ajaxgravatar&quot;).html('');
$email = $.trim($(&quot;#email&quot;).val()).toLowerCase();
//调用MD5 JavaScript文件的API
$gavatar = hex_md5($email);
//构造URL
$gavatar_url = &quot;http://www.gravatar.com/avatar/&quot;+$gavatar;
//动态修改头像
$(&quot;#ajaxgravatar&quot;).html('&lt;img id=&quot;ajaxgravatar&quot; alt=&quot;Gravatar&quot; src=&quot;'+ $gavatar_url +'?d=monsterid&quot;/&gt;')
});
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.haojii.com/2010/01/integrate-gravatar-for-comment-using-ajax/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[WebDev]有用的http-equiv属性</title>
		<link>http://www.haojii.com/2009/12/webdev-http-equiv/</link>
		<comments>http://www.haojii.com/2009/12/webdev-http-equiv/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 13:52:18 +0000</pubDate>
		<dc:creator>Jacky</dc:creator>
				<category><![CDATA[WebDev]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[web开发]]></category>

		<guid isPermaLink="false">http://www.haojii.com/?p=37</guid>
		<description><![CDATA[作为一个web开发人员，特别是在AJAX流行的时代，必须要熟悉这个http-equiv属性

1. 设置页面的自动刷新时间或者自动跳转时间
2. 关于页面缓存的设置
3. 编码 <a href="http://www.haojii.com/2009/12/webdev-http-equiv/">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>作为一个web开发人员，特别是在AJAX流行的时代，必须要熟悉这个http-equiv属性，这是w3school的一个参考表</p>
<table style="height: 198px;" border="1" cellspacing="0" cellpadding="0" width="474">
<tbody>
<tr>
<th width="30%" align="left" valign="top">Value</th>
<th width="70%" align="left" valign="top">Description</th>
</tr>
<tr>
<td valign="top">Allow</td>
<td valign="top">Defines the methods supported by the server</td>
</tr>
<tr>
<td valign="top">Content-Encoding</td>
<td valign="top">Defines additional content-encoding for the document</td>
</tr>
<tr>
<td valign="top">Content-Length</td>
<td valign="top">Defines the size of the document (in bytes)</td>
</tr>
<tr>
<td valign="top">Content-Type</td>
<td valign="top">Defines the MIME type of the document (like text/html)</td>
</tr>
<tr>
<td valign="top">Date</td>
<td valign="top">Defines when the document was created</td>
</tr>
<tr>
<td valign="top">Expires</td>
<td valign="top">Defines when the document will be considered obsolete</td>
</tr>
<tr>
<td valign="top">Last-Modified</td>
<td valign="top">Defines when the document was last modified</td>
</tr>
<tr>
<td valign="top">Location</td>
<td valign="top">Defines an absolute URL for the document</td>
</tr>
<tr>
<td valign="top">Refresh</td>
<td valign="top">Defines a time interval for the document to refresh  itself</td>
</tr>
<tr>
<td valign="top">Set-Cookie</td>
<td valign="top">Defines a cookie-value</td>
</tr>
<tr>
<td valign="top">WWW-Authenticate</td>
<td valign="top">Defines authentication rules returned by the server</td>
</tr>
</tbody>
</table>
<p>对于开发人员最实用的小技巧</p>
<p><strong>1. 设置页面的自动刷新时间或者自动跳转时间</strong></p>
<p>例如：著名的struts2的blank example就使用了这个小技巧，进行index页面的跳转</p>
<p>&lt;META HTTP-EQUIV=”Refresh” CONTENT=”0;URL=example/HelloWorld.action”&gt;</p>
<p><strong>2. 关于页面缓存的设置</strong></p>
<p>&lt;meta http-equiv=”pragma” content=”no-cache”&gt;</p>
<p>禁止浏览器访问本机缓存的页面，这对于AJAX应用程序的调试来说绝对需要</p>
<p>&lt;meta http-equiv=”expires” content=”Thu, 29 Nov 2007 16:18:42 GMT”&gt;</p>
<p>设置页面的过期时间，所以设置一个过去的值当然页面一直是过期的，那就要求浏览器再去请求服务端的页面</p>
<p><strong>3. 编码</strong></p>
<p>&lt;meta   http-equiv=”Content-Type”   content=”text/html;   charset=UTF-8&#8243;&gt;</p>
<p><strong>其他一些小花稍的功能</strong></p>
<p>如：页面进入和退出的特效 （貌似IE支持，FF不支持，其余浏览器未测试）<br />
&lt;meta http-equiv=”Page-Enter”  content=”revealTrans(duration=seconds, transition=type)”&gt;<br />
&lt;meta  http-equiv=”Page-Exit” content=”revealTrans(duration=x,  transition=type)”&gt;<br />
这个是页面被载入和调出时的一些特效。duration表示特效的持续时间，以秒为单位。transition表示使用哪种特效，取值为1-23:<br />
0  矩形缩小<br />
1 矩形扩大<br />
2 圆形缩小<br />
3 圆形扩大<br />
4 下到上刷新<br />
5 上到下刷新<br />
6  左到右刷新<br />
7 右到左刷新<br />
8 竖百叶窗<br />
9 横百叶窗<br />
10 错位横百叶窗<br />
11 错位竖百叶窗<br />
12  点扩散<br />
13 左右到中间刷新<br />
14 中间到左右刷新<br />
15 中间到上下<br />
16 上下到中间<br />
17  右下到左上<br />
18 右上到左下<br />
19 左上到右下<br />
20 左下到右上<br />
21 横条<br />
22 竖条<br />
23  以上22种随机选择一种</p>
<p>参考：</p>
<p><a href="http://www.w3schools.com/TAGS/att_meta_http_equiv.asp">http://www.w3schools.com/TAGS/att_meta_http_equiv.asp</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.haojii.com/2009/12/webdev-http-equiv/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

