<?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/"
	>

<channel>
	<title>一个程序猿 &#187; javascript</title>
	<atom:link href="http://www.sunboyu.cn/tag/javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sunboyu.cn</link>
	<description>时光不会倒流,脚步总要前进</description>
	<pubDate>Tue, 31 Jan 2012 10:50:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>JavaScript跨浏览器兼容代码</title>
		<link>http://www.sunboyu.cn/2008/08/03/javascript%e8%b7%a8%e6%b5%8f%e8%a7%88%e5%99%a8%e5%85%bc%e5%ae%b9%e4%bb%a3%e7%a0%81.shtml</link>
		<comments>http://www.sunboyu.cn/2008/08/03/javascript%e8%b7%a8%e6%b5%8f%e8%a7%88%e5%99%a8%e5%85%bc%e5%ae%b9%e4%bb%a3%e7%a0%81.shtml#comments</comments>
		<pubDate>Sun, 03 Aug 2008 14:58:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[JS]]></category>

		<category><![CDATA[兼容性]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=242</guid>
		<description><![CDATA[方法1：检测浏览器关键字
function __navigator()
{
&#160;&#160; &#160;this.value = false;&#160; &#160;//返回值&#160; ie 0 firefox 1 other 2
	this.useragent =&#160; navigator['userAgent'];
	if(this.useragent.indexOf('MSIE')&#62;0)
	{
	&#160; &#160; this.value = 0;
	}
	else if(this.useragent.indexOf('Firefox')&#62;0)
	{
	&#160; &#160; this.value = 1;
	}
	else
	{
	&#160; &#160; this.value = 2;
	}
}
方法2：
if(document.all)
&#160; ie
else
&#160; other
方法3：
&#60;!--[if IE]&#62;
&#160;&#160; &#160;js for ie
&#60;![endif]--&#62;
&#60;!--[if !IE]&#62;
&#160;&#160; &#160;js for !ie
&#60;![endif]--&#62;
方法4:
/*@cc_on
	&#160; @if(@_jscript)
	&#160; is for ie
	&#160; @else*/
	&#160; js for !ie
	/*@end
	&#160; @*/
]]></description>
			<content:encoded><![CDATA[<p>方法1：检测浏览器关键字</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">function __navigator()</li>
<li>{</li>
<li>&nbsp;&nbsp; &nbsp;this.value = false;&nbsp; &nbsp;//返回值&nbsp; ie 0 firefox 1 other 2</li>
<li>	this.useragent =&nbsp; navigator['userAgent'];</li>
<li>	if(this.useragent.indexOf('MSIE')&gt;0)</li>
<li>	{</li>
<li>	&nbsp; &nbsp; this.value = 0;</li>
<li>	}</li>
<li>	else if(this.useragent.indexOf('Firefox')&gt;0)</li>
<li>	{</li>
<li>	&nbsp; &nbsp; this.value = 1;</li>
<li>	}</li>
<li>	else</li>
<li>	{</li>
<li>	&nbsp; &nbsp; this.value = 2;</li>
<li>	}</li>
<li>}</li></ol></div>
<p>方法2：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">if(document.all)</li>
<li>&nbsp; ie</li>
<li>else</li>
<li>&nbsp; other</li></ol></div>
<p>方法3：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">&lt;!--[if IE]&gt;</li>
<li>&nbsp;&nbsp; &nbsp;js for ie</li>
<li>&lt;![endif]--&gt;</li>
<li>&lt;!--[if !IE]&gt;</li>
<li>&nbsp;&nbsp; &nbsp;js for !ie</li>
<li>&lt;![endif]--&gt;</li></ol></div>
<p>方法4:</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">/*@cc_on</li>
<li>	&nbsp; @if(@_jscript)</li>
<li>	&nbsp; is for ie</li>
<li>	&nbsp; @else*/</li>
<li>	&nbsp; js for !ie</li>
<li>	/*@end</li>
<li>	&nbsp; @*/</li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/08/03/javascript%e8%b7%a8%e6%b5%8f%e8%a7%88%e5%99%a8%e5%85%bc%e5%ae%b9%e4%bb%a3%e7%a0%81.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>JavaScript权威指南 第五版 到手</title>
		<link>http://www.sunboyu.cn/2008/06/23/javascript%e6%9d%83%e5%a8%81%e6%8c%87%e5%8d%97-%e7%ac%ac%e4%ba%94%e7%89%88-%e5%88%b0%e6%89%8b.shtml</link>
		<comments>http://www.sunboyu.cn/2008/06/23/javascript%e6%9d%83%e5%a8%81%e6%8c%87%e5%8d%97-%e7%ac%ac%e4%ba%94%e7%89%88-%e5%88%b0%e6%89%8b.shtml#comments</comments>
		<pubDate>Mon, 23 Jun 2008 11:56:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[纯属蛋疼]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[权威指南]]></category>

		<category><![CDATA[杜江]]></category>

		<category><![CDATA[第五版]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=135</guid>
		<description><![CDATA[JavaScript权威指南 第五版 到手，下午冒雨去中关村书店买的。


顺便AD一个，杜江老师的书，在推荐热卖区

]]></description>
			<content:encoded><![CDATA[<p>JavaScript权威指南 第五版 到手，下午冒雨去中关村书店买的。</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/img_3830.jpg"><img class="aligncenter size-full wp-image-138" title="img_3830" src="http://www.sunboyu.cn/upfiles/2008/06/img_3830.jpg" alt="" width="500" height="375" /></a></p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/img_3829.jpg"><img class="aligncenter size-full wp-image-137" title="img_3829" src="http://www.sunboyu.cn/upfiles/2008/06/img_3829.jpg" alt="" width="500" height="375" /></a></p>
<p>顺便AD一个，杜江老师的书，在推荐热卖区</p>
<p><a href="http://www.sunboyu.cn/upfiles/2008/06/img_3828.jpg"><img class="aligncenter size-full wp-image-136" title="img_3828" src="http://www.sunboyu.cn/upfiles/2008/06/img_3828.jpg" alt="" width="500" height="375" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/06/23/javascript%e6%9d%83%e5%a8%81%e6%8c%87%e5%8d%97-%e7%ac%ac%e4%ba%94%e7%89%88-%e5%88%b0%e6%89%8b.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>JS事件触发函数的一点小问题</title>
		<link>http://www.sunboyu.cn/2008/05/26/js%e4%ba%8b%e4%bb%b6%e8%a7%a6%e5%8f%91%e5%87%bd%e6%95%b0%e7%9a%84%e4%b8%80%e7%82%b9%e5%b0%8f%e9%97%ae%e9%a2%98.shtml</link>
		<comments>http://www.sunboyu.cn/2008/05/26/js%e4%ba%8b%e4%bb%b6%e8%a7%a6%e5%8f%91%e5%87%bd%e6%95%b0%e7%9a%84%e4%b8%80%e7%82%b9%e5%b0%8f%e9%97%ae%e9%a2%98.shtml#comments</comments>
		<pubDate>Mon, 26 May 2008 04:51:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[技术存档]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[onclick]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=54</guid>
		<description><![CDATA[写了个js的函数，使表单执行POST的操作
function form_submit()
{
doucment.getElementById(&#8217;xxxx&#8217;).submit();
}
使用这样的代码来调用  &#60;a onclick=&#8221;form_submit()&#8221; href=&#8221;javascript:void(0)&#8221;&#62;启用&#60;/a&#62;
IE6下无论如何都不执行，但在FF下却可以执行
然后修改为  &#60;a href=&#8221;javascript:form_submit()&#8221;&#62;停用&#60;/a&#62;
前段代码，经过测试，在onclick动作的时候，虽然href没有返回值，但onclick的动作成功触发了函数，可以执行操作，但无法执行post的操作，具体什么原因没有查明白，待解。
]]></description>
			<content:encoded><![CDATA[<p>写了个js的函数，使表单执行POST的操作</p>
<p>function form_submit()<br />
{<br />
doucment.getElementById(&#8217;xxxx&#8217;).submit();<br />
}</p>
<p>使用这样的代码来调用  &lt;a onclick=&#8221;form_submit()&#8221; href=&#8221;javascript:void(0)&#8221;&gt;启用&lt;/a&gt;</p>
<p>IE6下无论如何都不执行，但在FF下却可以执行</p>
<p>然后修改为  &lt;a href=&#8221;javascript:form_submit()&#8221;&gt;停用&lt;/a&gt;</p>
<p>前段代码，经过测试，在onclick动作的时候，虽然href没有返回值，但onclick的动作成功触发了函数，可以执行操作，但无法执行post的操作，具体什么原因没有查明白，待解。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/05/26/js%e4%ba%8b%e4%bb%b6%e8%a7%a6%e5%8f%91%e5%87%bd%e6%95%b0%e7%9a%84%e4%b8%80%e7%82%b9%e5%b0%8f%e9%97%ae%e9%a2%98.shtml/feed</wfw:commentRss>
		</item>
		<item>
		<title>一个不错的JS日期时间控件－My97Datepicker</title>
		<link>http://www.sunboyu.cn/2008/05/22/%e4%b8%80%e4%b8%aa%e4%b8%8d%e9%94%99%e7%9a%84js%e6%97%a5%e6%9c%9f%e6%97%b6%e9%97%b4%e6%8e%a7%e4%bb%b6%ef%bc%8dmy97datepicker.shtml</link>
		<comments>http://www.sunboyu.cn/2008/05/22/%e4%b8%80%e4%b8%aa%e4%b8%8d%e9%94%99%e7%9a%84js%e6%97%a5%e6%9c%9f%e6%97%b6%e9%97%b4%e6%8e%a7%e4%bb%b6%ef%bc%8dmy97datepicker.shtml#comments</comments>
		<pubDate>Thu, 22 May 2008 03:47:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[技术存档]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[My97Datepicker]]></category>

		<guid isPermaLink="false">http://www.sunboyu.cn/?p=37</guid>
		<description><![CDATA[最近在项目中大量表单应用日期时间的录入，原来用jscalendar，后发现此控件的浏览器兼容方面有问题，后修改，未果，寻一很强的插件，My97Datepicker，官方网站是 http://www.my97.net 有相当丰富的接口和调用方式，还有漂亮的模板。
非常建议大家看看。
]]></description>
			<content:encoded><![CDATA[<p>最近在项目中大量表单应用日期时间的录入，原来用jscalendar，后发现此控件的浏览器兼容方面有问题，后修改，未果，寻一很强的插件，My97Datepicker，官方网站是 http://www.my97.net 有相当丰富的接口和调用方式，还有漂亮的模板。</p>
<p>非常建议大家看看。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunboyu.cn/2008/05/22/%e4%b8%80%e4%b8%aa%e4%b8%8d%e9%94%99%e7%9a%84js%e6%97%a5%e6%9c%9f%e6%97%b6%e9%97%b4%e6%8e%a7%e4%bb%b6%ef%bc%8dmy97datepicker.shtml/feed</wfw:commentRss>
		</item>
	</channel>
</rss>

