<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[5D Home]]></title> 
<link>http://www.5dhome.net/myblog/index.php</link> 
<description><![CDATA[PHP, Typo3 CMS, Typolight CMS, Javascript, Jquery, Windows, Linux, iphone]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[5D Home]]></copyright>
<item>
<link>http://www.5dhome.net/myblog/read.php?187</link>
<title><![CDATA[blank开新窗口为什么通不过W3C验证]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Thu, 20 Dec 2007 01:39:34 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?187</guid> 
<description>
<![CDATA[ 
	我们要在新窗口中打开链接通常的做法是在链接后面加target=&quot;_blank&quot;，我们采用过渡型的DOCTYPE(xh tml1-transitional. dtd)时没有问题，但是当我们使用严格的DOCTYPE(xhtml1-strict.dtd)时，这个方法将通不过W3C的校验，会出现如下错误提示：<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">&quot;there is no attribute target for this element(in this HTML version)&quot;</div></div><br/><br/>原来在HTML4.01/XHTML1.0/XHTML1.1严格DOCTYPE下，target=&quot;_blank&quot;、target=&quot;_self&quot;等等语法都是无效的，我们只能通过JavaScript来变通实现。<br/><br/>有朋友问为什么不允许使用target=&quot;_blank&quot;？这个属性很方便啊。呵呵，不知道W3C的专家们是怎么想的，据我所知，主要是“易用性、友好性”的问题，因为老外觉得不经过用户同意，没有明确提示就打开一个新窗口是不礼貌的。先不管这个取消是否合理，我们来看看解决办法。<br/>rel属性<br/><br/>HTML4.0增加了一个新属性：rel，这个属性用来说明链接和包含此链接页面的关系，以及链接打开的目标。rel有许多的属性值，比如 next、previous,、chapter、section等等。我们要使用的就是rel=&quot;externa l&quot;属性。原来这样写的代码：<br/><div class="code">&lt;a href=&quot;document.html&quot; target=&quot;_blank&quot;&gt; 打开一个新窗口&lt;/a&gt;</div><br/><br/>现在要写成这样：<br/><div class="code">&lt;a href=&quot;document.html&quot; rel=&quot;external&quot;&gt;打开一个新窗口&lt;/a&gt;</div><br/><br/>这是符合strict标准的方法。当然还必须配合一个javascript才有效。<br/>javascript<br/><br/>完整的代码JS如下：<br/>[codes=js]<br/>&nbsp;&nbsp;&nbsp;&nbsp;function externallinks() &#123; <br/>&nbsp;&nbsp;&nbsp;&nbsp; if (!document.getElementsByTagName) return; <br/>&nbsp;&nbsp;&nbsp;&nbsp; var anchors = document.getElementsByTagName(&quot;a&quot;); <br/>&nbsp;&nbsp;&nbsp;&nbsp; for (var i=0; i&lt;anchors.length; i++) &#123; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var anchor = anchors[i]; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (anchor.getAttribute(&quot;href&quot;) &amp;&amp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; anchor.getAttribute(&quot;rel&quot;) == &quot;external&quot;) <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; anchor.target = &quot;_blank&quot;; <br/>&nbsp;&nbsp;&nbsp;&nbsp; &#125; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125; <br/>&nbsp;&nbsp;&nbsp;&nbsp;window.onload = externallinks;<br/>[/codes]<br/>你可以把它保存成一个.js文件(比如external.js)，然后通过外部联接方法调用：<br/>&lt;script type=&quot;text/javascript&quot; src=&quot;external.js&quot;&gt;&lt;/script&gt;<br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=html" rel="tag">html</a> , <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?184</link>
<title><![CDATA[Javascript + Css 控制tab （简单篇）]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Thu, 01 Nov 2007 08:56:24 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?184</guid> 
<description>
<![CDATA[ 
	javascript代码 // 底部有演示地址<br/>[codes=js]<br/>&lt;!--<br/>/* Set Tab on Style 1,2 */<br/>function setTab(m,n)&#123;<br/> var tli=document.getElementById(&quot;menu&quot;+m).getElementsByTagName(&quot;li&quot;);<br/> var mli=document.getElementById(&quot;main&quot;+m).getElementsByTagName(&quot;ul&quot;);<br/> for(i=0;i&lt;tli.length;i++)&#123;<br/> &nbsp;tli[i].className=i==n?&quot;hover&quot;:&quot;&quot;;<br/> &nbsp;mli[i].style.display=i==n?&quot;block&quot;:&quot;none&quot;;<br/> &#125;<br/>&#125;<br/><br/>/* Set Tab on Style 3 */<br/>var m3=&#123;0:&quot;5D Home :: content list on tab 1&quot;,1:&quot;5D Home :: content list on tab 2&quot;,2:&quot;5D Home :: content list on tab 3&quot;,3:&quot;5D Home :: content list on tab 4&quot;&#125;<br/>function nowtab(m,n)&#123;<br/> if(n!=0&amp;&amp;m3[0]==&quot;&quot;)m3[0]=document.getElementById(&quot;main2&quot;).innerHTML;<br/> document.getElementById(&quot;tip&quot;+m).style.left=n*100+&#039;px&#039;;<br/> document.getElementById(&quot;main2&quot;).innerHTML=m3[n];<br/>&#125;<br/>//--&gt;<br/>[/codes]<br/><br/>html代码 // 底部有演示地址<br/><div class="code"><br/>&lt;!-- Style 1 --&gt;<br/>&lt;div id=&quot;tabs0&quot;&gt;<br/> &lt;ul class=&quot;menu0&quot; id=&quot;menu0&quot;&gt;<br/> &nbsp;&lt;li onclick=&quot;setTab(0,0)&quot; class=&quot;hover&quot;&gt;tab 1&lt;/li&gt;<br/> &nbsp;&lt;li onclick=&quot;setTab(0,1)&quot;&gt;tab 2&lt;/li&gt;<br/> &nbsp;&lt;li onclick=&quot;setTab(0,2)&quot;&gt;tab 3&lt;/li&gt;<br/> &nbsp;&lt;li onclick=&quot;setTab(0,3)&quot;&gt;tab 4&lt;/li&gt;<br/> &lt;/ul&gt;<br/> &lt;div class=&quot;main&quot; id=&quot;main0&quot;&gt;<br/> &nbsp;&lt;ul class=&quot;block&quot;&gt;&lt;li&gt;5D Home :: content list on tab 1&lt;/li&gt;&lt;/ul&gt;<br/> &nbsp;&lt;ul&gt;&lt;li&gt;5D Home :: content list on tab 2&lt;/li&gt;&lt;/ul&gt;<br/> &nbsp;&lt;ul&gt;&lt;li&gt;5D Home :: content list on tab 3&lt;/li&gt;&lt;/ul&gt;<br/> &nbsp;&lt;ul&gt;&lt;li&gt;5D Home :: content list on tab 4&lt;/li&gt;&lt;/ul&gt;<br/> &lt;/div&gt;<br/>&lt;/div&gt;<br/>&lt;br /&gt;<br/>&lt;br /&gt;<br/><br/><br/>&lt;!-- Style 1 --&gt;<br/>&lt;div id=&quot;tabs1&quot;&gt;<br/> &lt;div class=&quot;menu1box&quot;&gt;<br/> &nbsp;&lt;ul id=&quot;menu1&quot;&gt;<br/> &nbsp; &lt;li class=&quot;hover&quot; onmouseover=&quot;setTab(1,0)&quot;&gt;&lt;a href=&quot;#&quot;&gt;tab 1&lt;/a&gt;&lt;/li&gt;<br/> &nbsp; &lt;li onmouseover=&quot;setTab(1,1)&quot;&gt;&lt;a href=&quot;#&quot;&gt;tab 2&lt;/a&gt;&lt;/li&gt;<br/> &nbsp; &lt;li onmouseover=&quot;setTab(1,2)&quot;&gt;&lt;a href=&quot;#&quot;&gt;tab 3&lt;/a&gt;&lt;/li&gt;<br/> &nbsp; &lt;li onmouseover=&quot;setTab(1,3)&quot;&gt;&lt;a href=&quot;#&quot;&gt;tab 4&lt;/a&gt;&lt;/li&gt;<br/> &nbsp;&lt;/ul&gt;<br/> &lt;/div&gt;<br/> &lt;div class=&quot;main1box&quot;&gt;<br/> &nbsp;&lt;div class=&quot;main&quot; id=&quot;main1&quot;&gt;<br/> &nbsp;&lt;ul class=&quot;block&quot;&gt;&lt;li&gt;5D Home :: content list on tab 1&lt;/li&gt;&lt;/ul&gt;<br/> &nbsp;&lt;ul&gt;&lt;li&gt;5D Home :: content list on tab 2&lt;/li&gt;&lt;/ul&gt;<br/> &nbsp;&lt;ul&gt;&lt;li&gt;5D Home :: content list on tab 3&lt;/li&gt;&lt;/ul&gt;<br/> &nbsp;&lt;ul&gt;&lt;li&gt;5D Home :: content list on tab 4&lt;/li&gt;&lt;/ul&gt;<br/> &nbsp;&lt;/div&gt;<br/> &lt;/div&gt;<br/>&lt;/div&gt;<br/>&lt;br /&gt;<br/>&lt;br /&gt;<br/><br/><br/>&lt;!-- Style 3 --&gt;<br/>&lt;div id=&quot;tabs2&quot;&gt;<br/> &lt;div class=&quot;menu2box&quot;&gt;<br/> &nbsp;&lt;div id=&quot;tip2&quot;&gt;&lt;/div&gt;<br/> &nbsp;&lt;ul id=&quot;menu2&quot;&gt;<br/> &nbsp; &lt;li class=&quot;hover&quot; onmouseover=&quot;nowtab(2,0)&quot;&gt;&lt;a href=&quot;#&quot;&gt;tab 1&lt;/a&gt;&lt;/li&gt;<br/> &nbsp; &lt;li onmouseover=&quot;nowtab(2,1)&quot;&gt;&lt;a href=&quot;#&quot;&gt;tab 2&lt;/a&gt;&lt;/li&gt;<br/> &nbsp; &lt;li onmouseover=&quot;nowtab(2,2)&quot;&gt;&lt;a href=&quot;#&quot;&gt;tab 3&lt;/a&gt;&lt;/li&gt;<br/> &nbsp; &lt;li onmouseover=&quot;nowtab(2,3)&quot;&gt;&lt;a href=&quot;#&quot;&gt;tab 4&lt;/a&gt;&lt;/li&gt;<br/> &nbsp;&lt;/ul&gt;<br/> &lt;/div&gt;<br/>&lt;div class=&quot;main&quot; id=&quot;main2&quot;&gt;<br/>5D Home :: content list on tab 1<br/>&lt;/div&gt;<br/>&lt;/div&gt;<br/>&lt;br /&gt;<br/>&lt;br /&gt;<br/></div><br/><br/><a href="http://www.5dhome.net/demo/js/tab.html" target="_blank">演示地址</a><br/><br/><br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a> , <a href="http://www.5dhome.net/myblog/tag.php?tag=html" rel="tag">html</a> , <a href="http://www.5dhome.net/myblog/tag.php?tag=css" rel="tag">css</a> , <a href="http://www.5dhome.net/myblog/tag.php?tag=xhtml" rel="tag">xhtml</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?178</link>
<title><![CDATA[javascript的正则替换（入门篇）]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Mon, 08 Oct 2007 08:17:08 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?178</guid> 
<description>
<![CDATA[ 
	该功能主要是用javascript的正则替换，replace(reStr, &quot;&quot;)函数将字符串中&lt;img src=&#039;abc.gif&#039;&gt;替换成了空格。<br/><br/>[codes=js]<br/>&lt;script&gt;<br/>function replaceStr()&#123;<br/>var str, reStr = &quot;&lt;img src=&#039;abc.gif&#039;&gt;&quot;; &nbsp; <br/>str = &quot;This is test String&lt;img src=&#039;abc.gif&#039;&gt;. This is test String.&quot;.replace(reStr, &quot;&quot;);<br/>alert(str);<br/>return str;<br/>&#125;<br/>&lt;/script&gt;<br/><br/>&lt;a href=&quot;#&quot; onclick=&quot;replaceStr()&quot;&gt;Click here to test&lt;/a&gt;<br/>[/codes]<br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?152</link>
<title><![CDATA[Jquery - 茅点的动画 (Scroll To Paragraph)]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Tue, 19 Jun 2007 04:58:09 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?152</guid> 
<description>
<![CDATA[ 
	越来越发现Jquery的强大，呵呵，从一堆代码中提取了这段代码出来，做了点小修改，很不错的也很实用的效果。分享给大家，javascript的强大不是我这种人可以评论的，但是flash能做到的效果，发现js也是可以做出来的，哪天flash对搜索引擎更友好了，我也会好好研究一下flash的as，废话少说。<br/><br/>这个页面滚动效果效果用jquery做起来很简单，我来剖析一下<br/><br/>1）页面格式<br/>原先试了&lt;html&gt;，发现不能工作，检查了一下发现是这个页面格式规范问题，具体为什么，不是很清楚地说，呵呵，要到w3网站好好研究研究。<br/><div class="code"><br/>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br/>&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br/></div><br/><br/>2）所需的javascript<br/>在页面的head里面，载入2个js脚本<br/><div class="code"><br/>&lt;script type=&quot;text/javascript&quot; src=&quot;script/jquery.js&quot;&gt;&lt;/script&gt;<br/>&lt;script type=&quot;text/javascript&quot; src=&quot;script/interface.js&quot;&gt;&lt;/script&gt;<br/></div><br/><br/>2）html代码上的js<br/>由于过于简单，没啥好说的<br/><div class="code"><br/>&lt;a href=&quot;#LastParagraph&quot; onClick=&quot;$(&#039;#LastParagraph&#039;).ScrollTo(1200); return false;&quot;&gt;Scroll to last paragraph&lt;/a&gt;<br/></div><br/><br/><a href="http://www.5dhome.net/demo/js/scrolltoparagraph/demo2.html" target="_blank">演示地址</a><br/><br/><a href="http://www.5dhome.net/demo/js/scrolltoparagraph/scrolltop.zip" target="_blank">演示下载</a><br/><br/><br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a> , <a href="http://www.5dhome.net/myblog/tag.php?tag=jquery" rel="tag">jquery</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?151</link>
<title><![CDATA[AJAX - 多级菜单 （Jquery篇）]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Mon, 18 Jun 2007 07:14:14 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?151</guid> 
<description>
<![CDATA[ 
	最近发现Jquery挺火的，相对用起来比prototype来的要方便的多，由于多级类要使用到多级菜单，苦苦寻找了半天，没有找到jquery的这个多级类。只好自己埋头写了一个，分享给大家，不过功能可能善不完善。如需改进的地方，请发<a href="mailto:34n.sam@gmail.com">34n.sam@gmail.com</a>告诉我，谢谢。<br/><br/>总的说起来，多级菜单在纯js下真的很复杂，所以才想到了用ajax，因我比较懒。<br/><br/>整个ajax的多级菜单，我分为了3个文件。<br/>1) jquery.js // 这个不是我写的，呵呵，我可没那么牛<br/>2) demo.html // 实现多级菜单的html文件<br/>3) makemenu.php // 菜单数据的来源<br/><br/>现在我来分析一下制作多级菜单的注意事项<br/><br/>jquery.js 这个脚本没什么好说的，我把它打包到附件里面<br/><br/><strong>demo.html</strong><br/><div class="code"><br/>&lt;form name=&quot;myform&quot; id=&quot;myform&quot; class=&quot;myform&quot;&gt;<br/> &nbsp;&lt;p&gt;level 1:<br/> &nbsp; &nbsp;&lt;select id=&quot;menu_level_1&quot; class=&quot;selectmenu&quot;&gt; &nbsp;// 一级菜单<br/> &nbsp; &nbsp; &nbsp;&lt;option value=&quot;1&quot;&gt;menu 1&lt;/option&gt;<br/> &nbsp; &nbsp; &nbsp;&lt;option value=&quot;2&quot;&gt;menu 2&lt;/option&gt;<br/> &nbsp; &nbsp; &nbsp;&lt;option value=&quot;3&quot;&gt;menu 3&lt;/option&gt;<br/> &nbsp; &nbsp; &nbsp;&lt;option value=&quot;4&quot;&gt;menu 4&lt;/option&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/select&gt;<br/> &nbsp;&lt;/p&gt; <br/><br/> &nbsp;&lt;p&gt;level 2: &nbsp; &nbsp; <br/> &nbsp; &nbsp;&lt;select id=&quot;menu_level_2&quot; class=&quot;selectmenu&quot;&gt; // 二级菜单<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/select&gt;<br/> &nbsp;&lt;/p&gt;<br/><br/> &nbsp;&lt;p&gt;level 2: &nbsp; &nbsp; <br/> &nbsp; &nbsp;&lt;select &nbsp;id=&quot;menu_level_3&quot; class=&quot;selectmenu&quot;&gt; // 三级菜单<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/select&gt;<br/> &nbsp;&lt;/p&gt; &nbsp;<br/>&lt;/form&gt;<br/></div><br/><br/>在demo.html的头部的js,这个才是最重要的<br/>[codes=js]<br/> &nbsp; &nbsp;&lt;script type=&quot;text/javascript&quot; src=&quot;script/jquery.js&quot;&gt;&lt;/script&gt; //载入jquery.js<br/> &nbsp; &nbsp;&lt;script type=&quot;text/javascript&quot;&gt; &nbsp; <br/> &nbsp; $(document).ready(function() &#123;<br/> &nbsp; &nbsp; // init 初始化<br/> &nbsp; &nbsp; var level_1 = $(&quot;#menu_level_1&quot;); &nbsp;// 关联到的select的ID<br/> &nbsp; &nbsp;var level_2 = $(&quot;#menu_level_2&quot;);<br/> &nbsp; &nbsp;var level_3 = $(&quot;#menu_level_3&quot;);<br/> &nbsp; &nbsp;level_2.attr(&quot;disabled&quot;,&quot;disabled&quot;); // 作的一个特效，数据没有载入成功时，处于屏蔽状态，并显示loading...<br/> &nbsp; &nbsp;level_3.attr(&quot;disabled&quot;,&quot;disabled&quot;); &nbsp;<br/> &nbsp; &nbsp;<br/> &nbsp; &nbsp;level_1.change(function()&#123;<br/> &nbsp; &nbsp; &nbsp;level_2.append(&quot;&lt;option&gt;loading...&lt;/option&gt;&quot;);<br/> &nbsp; &nbsp; &nbsp;level_3.attr(&quot;disabled&quot;,&quot;disabled&quot;);<br/> &nbsp; &nbsp; &nbsp;$.ajax(&#123;<br/> &nbsp; &nbsp; &nbsp; &nbsp;type: &quot;POST&quot;, //提交方式<br/> &nbsp; &nbsp; &nbsp; &nbsp;url: &quot;makemenu.php&quot;, // 提交到的目的文件<br/> &nbsp; &nbsp; &nbsp; &nbsp;data: &quot;level=1&amp;menuid=&quot;+level_1.val(), //提交到php的数据<br/> &nbsp; &nbsp; &nbsp; &nbsp;<br/> &nbsp; &nbsp; &nbsp; &nbsp;success: function(msg)&#123; // 提交并成功获得返回数据的处理<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var menu_level2_array,menu_level2_option;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;level_2.removeAttr(&quot;disabled&quot;);<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$(&quot;#menu_level_2 option&quot;).remove(); &nbsp;// remove option<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$(&quot;#menu_level_3 option&quot;).remove(); &nbsp;// remove option<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;menu_level2_array = msg.split(&quot;::&quot;); // 这里用的是直接文本获取，还没搞懂如何读取XML的格式，呵呵，有空再研究一下<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(var i=0;i&lt;menu_level2_array.length;i++)&#123;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;menu_level2_option = menu_level2_array[i].split(&quot;,&quot;);<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(menu_level2_option[0] != &quot;&quot;)&#123;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;level_2.append(&quot;&lt;option value=&#039;&quot;+menu_level2_option[0]+&quot;&#039;&gt;&quot;+menu_level2_option[1]+&quot;&lt;/option&gt;&quot;);<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#125;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#125;<br/> &nbsp; &nbsp; &nbsp; &nbsp;&#125;<br/> &nbsp; &nbsp; &nbsp; &#125;);<br/> &nbsp; &nbsp;&#125;);<br/> &nbsp; &nbsp;<br/> &nbsp; &nbsp;<br/> &nbsp; &nbsp;level_2.change(function()&#123;<br/> &nbsp; &nbsp; &nbsp;level_3.append(&quot;&lt;option&gt;loading...&lt;/option&gt;&quot;);<br/> &nbsp; &nbsp; &nbsp;$.ajax(&#123;<br/> &nbsp; &nbsp; &nbsp; &nbsp;type: &quot;POST&quot;,<br/> &nbsp; &nbsp; &nbsp; &nbsp;url: &quot;makemenu.php&quot;,<br/> &nbsp; &nbsp; &nbsp; &nbsp;data: &quot;level=2&amp;menuid=&quot;+level_2.val(),<br/> &nbsp; &nbsp; &nbsp; &nbsp;success: function(msg)&#123;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var menu_level3_array,menu_level3_option;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;level_3.removeAttr(&quot;disabled&quot;);<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$(&quot;#menu_level_3 option&quot;).remove(); &nbsp;// remove option<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;menu_level3_array = msg.split(&quot;::&quot;);<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(var i=0;i&lt;menu_level3_array.length;i++)&#123;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;menu_level3_option = menu_level3_array[i].split(&quot;,&quot;);<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(menu_level3_option[0] != &quot;&quot;)&#123;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;level_3.append(&quot;&lt;option value=&#039;&quot;+menu_level3_option[0]+&quot;&#039;&gt;&quot;+menu_level3_option[1]+&quot;&lt;/option&gt;&quot;);<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#125;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#125;<br/> &nbsp; &nbsp; &nbsp; &nbsp;&#125;<br/> &nbsp; &nbsp; &nbsp; &#125;);<br/> &nbsp; &nbsp;&#125;); &nbsp; &nbsp;<br/> &nbsp; &nbsp;<br/> &nbsp; &#125;);<br/> &nbsp; <br/> &nbsp; &nbsp;&lt;/script&gt;<br/>[/codes]<br/><br/><br/>makemenu.php<br/>[codes=php]<br/>&lt;?php<br/>$level &nbsp;= $_POST[&#039;level&#039;];<br/>$menuid &nbsp;= $_POST[&#039;menuid&#039;];<br/><br/>$menu_array_1 = array( // 二级菜单元素<br/> &nbsp;1 =&gt; array(<br/> &nbsp; &nbsp;array(&quot;1&quot;,&quot;menu 1.1&quot;),<br/> &nbsp; &nbsp;array(&quot;2&quot;,&quot;menu 1.2&quot;),<br/> &nbsp; &nbsp;array(&quot;3&quot;,&quot;menu 1.3&quot;)<br/> &nbsp;),<br/> &nbsp;<br/> &nbsp;2 =&gt; array(<br/> &nbsp; &nbsp;array(&quot;4&quot;,&quot;menu 2.1&quot;),<br/> &nbsp; &nbsp;array(&quot;5&quot;,&quot;menu 2.2&quot;),<br/> &nbsp; &nbsp;array(&quot;6&quot;,&quot;menu 2.3&quot;)<br/> &nbsp;),<br/> &nbsp;<br/> &nbsp;3 =&gt; array(<br/> &nbsp; &nbsp;array(&quot;7&quot;,&quot;menu 3.1&quot;),<br/> &nbsp; &nbsp;array(&quot;8&quot;,&quot;menu 3.2&quot;),<br/> &nbsp; &nbsp;array(&quot;9&quot;,&quot;menu 3.3&quot;)<br/> &nbsp;)<br/>);<br/><br/><br/>$menu_array_2 = array( // 3级菜单元素<br/> &nbsp;4 =&gt; array(<br/> &nbsp; &nbsp;array(&quot;10&quot;,&quot;menu 2.1.1&quot;),<br/> &nbsp; &nbsp;array(&quot;11&quot;,&quot;menu 2.1.2&quot;),<br/> &nbsp; &nbsp;array(&quot;12&quot;,&quot;menu 2.1.3&quot;)<br/> &nbsp;),<br/> &nbsp;<br/> &nbsp;5 =&gt; array(<br/> &nbsp; &nbsp;array(&quot;13&quot;,&quot;menu 2.2.1&quot;),<br/> &nbsp; &nbsp;array(&quot;14&quot;,&quot;menu 2.2.2&quot;),<br/> &nbsp; &nbsp;array(&quot;15&quot;,&quot;menu 2.2.3&quot;)<br/> &nbsp;),<br/> &nbsp;<br/> &nbsp;7 =&gt; array(<br/> &nbsp; &nbsp;array(&quot;17&quot;,&quot;menu 3.1.1&quot;),<br/> &nbsp; &nbsp;array(&quot;18&quot;,&quot;menu 3.1.2&quot;),<br/> &nbsp; &nbsp;array(&quot;19&quot;,&quot;menu 3.1.3&quot;)<br/> &nbsp;)<br/>);<br/><br/>switch($level)&#123;<br/> &nbsp;case &quot;1&quot;: // 一级菜单传递数据，获得二级菜单，并将之处理成字符串<br/> &nbsp; &nbsp;$menu_array = $menu_array_1[$menuid];<br/> &nbsp; &nbsp;//print_r($menu_array);<br/> &nbsp; &nbsp;$data = &quot;&quot;;<br/> &nbsp; &nbsp;for($i=0;$i&lt;count($menu_array);$i++)&#123;<br/> &nbsp; &nbsp; &nbsp;$data.= $menu_array[$i][0].&quot;,&quot;.$menu_array[$i][1].&quot;::&quot;;<br/> &nbsp; &nbsp;&#125;<br/> &nbsp; &nbsp;break;<br/> &nbsp; &nbsp;<br/> &nbsp; &nbsp;<br/> &nbsp;case &quot;2&quot;:// 二级菜单传递数据，获得三级菜单，并将之处理成字符串<br/> &nbsp; &nbsp;$menu_array = $menu_array_2[$menuid];<br/> &nbsp; &nbsp;//print_r($menu_array);<br/> &nbsp; &nbsp;$data = &quot;&quot;;<br/> &nbsp; &nbsp;for($i=0;$i&lt;count($menu_array);$i++)&#123;<br/> &nbsp; &nbsp; &nbsp;$data.= $menu_array[$i][0].&quot;,&quot;.$menu_array[$i][1].&quot;::&quot;;<br/> &nbsp; &nbsp;&#125;<br/> &nbsp; &nbsp;break;<br/> &nbsp; &nbsp;<br/> &nbsp; &nbsp;<br/> &nbsp;case &quot;3&quot;: $data= &quot;data 3&quot;;break; // 要做多少级，就做多少级，能读懂我写的js的朋友，修改起来应该没有什么大问题<br/> &nbsp;case &quot;4&quot;: $data= &quot;data 4&quot;;break;<br/>&#125;<br/><br/>echo $data;<br/>?&gt;<br/>[/codes]<br/><br/><br/><span style="color: #FF4500;"><a href="http://www.5dhome.net/demo/js/dropdownmenu/demo.html" target="_blank">演示地址</a></span><br/><br/><span style="color: #FF4500;"><a href="http://www.5dhome.net/demo/js/dropdownmenu/demo.zip" target="_blank">演示下载</a></span><br/><br/><br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a> , <a href="http://www.5dhome.net/myblog/tag.php?tag=ajax" rel="tag">ajax</a> , <a href="http://www.5dhome.net/myblog/tag.php?tag=jquery" rel="tag">jquery</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?147</link>
<title><![CDATA[javascript calendar万年历使用实例]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Mon, 28 May 2007 09:47:48 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?147</guid> 
<description>
<![CDATA[ 
	jquery calendar是一个很酷的日历效果，在多个浏览器测试过，都比较正常。下面来介绍一下如何使用这个日历到具体的web页面中。<br/><br/>head设置，将日历运行的js脚本以及css样式表装载<br/><br/><div class="code"><br/>&lt;script type=&quot;text/javascript&quot; src=&quot;script/jquery-latest.pack.js&quot;&gt;&lt;/script&gt;<br/>&lt;script type=&quot;text/javascript&quot; src=&quot;script/jquery-calendar.pack.js&quot;&gt;&lt;/script&gt;<br/>&lt;script type=&quot;text/javascript&quot; src=&quot;script/calendar-demo.js&quot;&gt;&lt;/script&gt;<br/>&lt;style type=&quot;text/css&quot;&gt;<br/> &nbsp; &nbsp;@import url(css/jquery-calendar.css);<br/>&lt;/style&gt;<br/></div><br/><br/>如果要对日历进行特殊设置，jquery-calendar.css可以修改成你自己喜欢的样式，这对css的代码要有一定的基础才行。<br/><br/>如要修改日历的基本配置，可以修改calendar-demo.js中的代码，如下代码，及对应于页面展示的脚本<br/><br/>[codes=js]<br/>$(document).ready(function () &#123;<br/>&nbsp;&nbsp;popUpCal.hideCalendar();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;// default setting<br/>&nbsp;&nbsp;popUpCal.closeText = &#039;Close&#039;;<br/>&nbsp;&nbsp;popUpCal.prevText = &#039;&amp;lt;Prev&#039;;<br/>&nbsp;&nbsp;popUpCal.nextText = &#039;Next&amp;gt;&#039;;<br/>&nbsp;&nbsp;popUpCal.currentText = &#039;Today&#039;;<br/>&nbsp;&nbsp;popUpCal.dayNames = new Array(&#039;Sunday&#039;,&#039;Monday&#039;,&#039;Tuesday&#039;,&#039;Wednesday&#039;,&#039;Thursday&#039;,&#039;Friday&#039;,&#039;Saturday&#039;);<br/>&nbsp;&nbsp;popUpCal.monthNames = new Array(&#039;January&#039;,&#039;February&#039;,&#039;March&#039;,&#039;April&#039;,&#039;May&#039;,&#039;June&#039;,&#039;July&#039;,&#039;August&#039;,&#039;September&#039;,&#039;October&#039;,&#039;November&#039;,&#039;December&#039;);<br/>&nbsp;&nbsp;popUpCal.dateFormat = &#039;DMY/&#039;;<br/>&nbsp;&nbsp;popUpCal.minDate = new Date(2005, 4 - 1, 1);<br/>&nbsp;&nbsp;popUpCal.maxDate = new Date(2008, 4 - 1, 30);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;$(&#039;#more div&#039;).hide();<br/>&nbsp;&nbsp;$(&#039;#more0&#039;).show();<br/>&nbsp;&nbsp;popUpCal.autoPopUp = false;<br/>&nbsp;&nbsp;$(&#039;.calendarButton&#039;).calendar();<br/>&nbsp;&nbsp;popUpCal.autoPopUp = true;<br/>&nbsp;&nbsp;$(&#039;.calendarFocus&#039;).calendar();<br/><br/>&#125;);<br/>[/codes]<br/><br/>配置好后，只要在页面body中，写下如下代码，即可看到日历的效果<br/><br/><div class="code"><br/>&lt;div class=&quot;container&quot;&gt;<br/>&lt;p&gt;Calendar appears on focus: &lt;input type=&quot;text&quot; size=&quot;10&quot; class=&quot;calendarFocus&quot;/&gt;&lt;/p&gt;<br/>&lt;p&gt;Calendar appears via button: &lt;input type=&quot;text&quot; size=&quot;10&quot; class=&quot;calendarButton&quot;/&gt;&lt;/p&gt;<br/>&lt;/div&gt;<br/></div><br/><br/>一个是焦点事件，一个是按钮事件，估计作一般效果够用了。<br/><br/><a href="http://www.5dhome.net/demo/js/canlendar/calendar.html" target="_blank">演示地址</a><br/><br/><a href="http://www.5dhome.net/myblog/attachment/canlendar.zip" target="_blank">演示代码下载</a><br/><br/><br/><br/><br/><br/><br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?142</link>
<title><![CDATA[文本框有内容时，复选框自动选中]]></title> 
<author>luye &lt;&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Mon, 21 May 2007 04:57:38 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?142</guid> 
<description>
<![CDATA[ 
	javascript 代码：<br/>[codes=js]&lt;script language=&quot;javascript&quot;&gt;<br/>function blur_func()&#123;<br/> &nbsp;if (document.form1.textbox.value!==&#039;&#039;)&#123;<br/> &nbsp; &nbsp;document.form1.cb_name.checked=true;<br/> &nbsp;&#125;else&#123;<br/> &nbsp; &nbsp;document.form1.cb_name.checked=false;<br/> &nbsp;&#125;<br/>&#125;<br/>&lt;/script&gt;[/codes]<br/><br/>html 中的调用：<br/><div class="code">&lt;form id=&quot;form1&quot; name=&quot;form1&quot; method=&quot;post&quot; action=&quot;&quot;&gt;<br/> &nbsp;&lt;input type=&quot;checkbox&quot; name=&quot;cb_name&quot; value=&quot;checkbox&quot; onclick=&quot;return blur_func();&quot; /&gt;<br/> &nbsp;&lt;input type=&quot;text&quot; name=&quot;textbox&quot; &nbsp;onkeyup=&quot;return blur_func();&quot; onchange=&quot;return blur_func();&quot;/&gt;<br/>&lt;/form&gt;</div><br/><br/><a href="http://www.5dhome.net/demo/js/checkbox.html" target="_blank"><span style="color: #FF7F50;">演示地址</span></a><br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?136</link>
<title><![CDATA[javascript thickbox (很棒的js，展示图片及内容的特效)]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Wed, 09 May 2007 05:09:51 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?136</guid> 
<description>
<![CDATA[ 
	一个非常好的效果，支持多浏览器<br/><br/>图片的演示效果，<a href="http://www.5dhome.net/demo/js/thickbox/example-image.html" target="_blank">点击这里查看</a><br/>相册阿，图库阿，用这种效果展示绝对cool~~<br/><br/>内嵌内容的演示效果，<a href="http://www.5dhome.net/demo/js/thickbox/example-text-in.html" target="_blank">点击这里查看</a><br/>长篇的文章，以前都用矛点飞来飞去，有了thickbox，再也不用为此烦恼，thickbox好，吃饭甭香！！<br/><br/>外部载入内容的演示效果，<a href="http://www.5dhome.net/demo/js/thickbox/example-text-out.html" target="_blank">点击这里察看</a><br/>以前常用弹出窗口，可是效果往往不好，而且常被某些浏览器屏蔽，用thickbox比弹出窗好10倍的效果，kero~kero~li~~<br/><br/>好似专门为thickbox打广告似的，呵呵，确实是一个不错的东西，不敢私藏，好东西大家分享~~<br/><br/><a href="attachment/thickbox.zip">点击这里下载文件</a><br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?135</link>
<title><![CDATA[javascript tooltip (网页的提示效果)]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Wed, 09 May 2007 03:59:02 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?135</guid> 
<description>
<![CDATA[ 
	一个很不错的javascript网页提示效果的封装，个人认为style 7，8，9在实际情况最为实用<br/><br/>点这里看<a href="http://www.5dhome.net/demo/js/tooltip/example.html" target="_blank">演示效果</a><br/><br/>点这里<a href="http://www.5dhome.net/myblog/attachment/tooltip.zip" target="_blank">下载演示</a><br/><br/>详细分析，请阅读全文<br/><br/><br/><br/><br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/><strong>第一步</strong><br/>&lt;script language=&quot;JavaScript1.2&quot; src=&quot;js/main.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br/>将此写在head中<br/></div></div><br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/><strong>第二步</strong><br/>&lt;script language=&quot;JavaScript1.2&quot; src=&quot;js/style.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br/>将此写在body中, 个人建议不用这种加载的形式，可把style.js解开直接写在页面中，这有一个好处就是，如果要实现动态的效果的时候可以从数据库直接读取，对其进行替换<br/></div></div><br/><br/><br/>[codes=js]<br/>&lt;script type=&quot;text/javascript&quot;&gt;<br/>var FiltersEnabled = 1 // if your not going to use transitions or filters in any of the tips set this to 0<br/><br/>Text[0]=[&quot;5dhome.net&quot;,&quot;Business planning software.&quot;]<br/>Text[1]=[&quot;&quot;,&quot;&lt;b&gt;SimplytheBest DHTML Scripts&lt;/b&gt;&lt;br&gt;A collection of the best DHTML script and Javascripts on the Web.&quot;]<br/>Text[2]=[&quot;Right&quot;,&quot;This box is right positioned.&quot;]<br/>Text[3]=[&quot;Center&quot;,&quot;This box is center positioned.&quot;]<br/>Text[4]=[&quot;Left&quot;,&quot;This box is left positioned.&quot;]<br/>Text[5]=[&quot;Float&quot;,&quot;This box is float positioned at a (10,10) coordinate, it also floats with the scrollbars so it is always static.&quot;]<br/>Text[6]=[&quot;Fixed&quot;,&quot;This box is fixed positioned at a (150,400) coordinate.&quot;]<br/>Text[7]=[&quot;Sticky style&quot;,&quot;This box will sticky around&lt;br&gt;This is useful when you want to insert a link like this &lt;A href=&#039;http://www.5dhome.net&#039;&gt;PlanMagic&lt;/A&gt;.&quot;]<br/>Text[8]=[&quot;Keep style&quot;,&quot;This sticks around the mouse.&quot;]<br/>Text[9]=[&quot;Left coordinate control&quot;,&quot;This box is right positioned with a 40 X coordinate.&quot;]<br/>Text[10]=[&quot;Top coordinate control&quot;,&quot;This box is right positioned with a 50 Y coordinate.&quot;]<br/>Text[11]=[&quot;Visual effects&quot;,&quot;This box has a Shadow and a bit of Transparency. It also has a random Transition effect applied to it.&quot;]<br/>Text[12]=[&quot;Different style&quot;,&quot;This has a whole new style!&quot;]<br/>Text[13]=[&quot;&quot;,&quot;&lt;b&gt;PlanMagic Business Software:&lt;/b&gt;&lt;ul&gt;&lt;li&gt;Business plan&lt;li&gt;Marketing plan&lt;li&gt;Financial plan&lt;li&gt;Construction plan&lt;li&gt;Bar business plan&lt;li&gt;Restaurant plan&lt;li&gt;Hotel business plan&lt;li&gt;Resort business plan&lt;/ul&gt;&quot;]<br/><br/><br/>Style[0]=[&quot;white&quot;,&quot;black&quot;,&quot;#cc0000&quot;,&quot;#FFCC99&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,200,&quot;&quot;,2,2,10,10,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]<br/>Style[1]=[&quot;white&quot;,&quot;black&quot;,&quot;#cc0000&quot;,&quot;#FFCC99&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;center&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,200,&quot;&quot;,2,2,10,10,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]<br/>Style[2]=[&quot;white&quot;,&quot;black&quot;,&quot;#cc0000&quot;,&quot;#FFCC99&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;left&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,200,&quot;&quot;,2,2,10,10,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]<br/>Style[3]=[&quot;white&quot;,&quot;black&quot;,&quot;#cc0000&quot;,&quot;#FFCC99&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;float&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,200,&quot;&quot;,2,2,10,10,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]<br/>Style[4]=[&quot;white&quot;,&quot;black&quot;,&quot;#cc0000&quot;,&quot;#FFCC99&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;fixed&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,200,&quot;&quot;,2,2,150,400,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]<br/>Style[5]=[&quot;white&quot;,&quot;black&quot;,&quot;#cc0000&quot;,&quot;#FFCC99&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;sticky&quot;,&quot;&quot;,&quot;&quot;,200,&quot;&quot;,2,2,10,10,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]<br/>Style[6]=[&quot;white&quot;,&quot;black&quot;,&quot;#cc0000&quot;,&quot;#FFCC99&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;keep&quot;,&quot;&quot;,&quot;&quot;,200,&quot;&quot;,2,2,10,10,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]<br/>Style[7]=[&quot;white&quot;,&quot;black&quot;,&quot;#cc0000&quot;,&quot;#FFCC99&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,200,&quot;&quot;,2,2,40,10,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]<br/>Style[8]=[&quot;white&quot;,&quot;black&quot;,&quot;#cc0000&quot;,&quot;#FFCC99&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,200,&quot;&quot;,2,2,10,50,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]<br/>Style[9]=[&quot;white&quot;,&quot;black&quot;,&quot;#cc0000&quot;,&quot;#FFCC99&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,200,&quot;&quot;,2,2,10,10,51,0.5,75,&quot;simple&quot;,&quot;gray&quot;]<br/>Style[10]=[&quot;white&quot;,&quot;black&quot;,&quot;black&quot;,&quot;white&quot;,&quot;&quot;,&quot;&quot;,&quot;right&quot;,&quot;&quot;,&quot;Tahoma&quot;,&quot;cursive&quot;,&quot;center&quot;,&quot;&quot;,3,4,200,20,5,10,10,0,50,1,70,&quot;complex&quot;,&quot;gray&quot;]<br/>Style[11]=[&quot;white&quot;,&quot;black&quot;,&quot;#cc0000&quot;,&quot;#FFCC99&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,200,&quot;&quot;,2,2,10,10,51,0.5,45,&quot;simple&quot;,&quot;gray&quot;]<br/>Style[12]=[&quot;white&quot;,&quot;black&quot;,&quot;#cc0000&quot;,&quot;#FFCC99&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,200,&quot;&quot;,2,2,10,10,51,1,0,&quot;&quot;,&quot;&quot;]<br/><br/>applyCssFilter()<br/>&lt;/script&gt;<br/>[/codes]<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/><strong>第三步</strong><br/>在body中具体使用函数<br/>&lt;A href=&quot;yourpage.html&quot; onMouseOver=&quot;stm(Text[0],Style[6])&quot; onMouseOut=&quot;htm()&quot;&gt;Your text [0][6]&lt;/A&gt;<br/>&lt;A href=&quot;yourpage.html&quot; onMouseOver=&quot;stm(Text[0],Style[7])&quot; onMouseOut=&quot;htm()&quot;&gt;Your text [0][7]&lt;/A&gt;<br/>&lt;A href=&quot;yourpage.html&quot; onMouseOver=&quot;stm(Text[0],Style[8])&quot; onMouseOut=&quot;htm()&quot;&gt;Your text [0][8]&lt;/A&gt;<br/></div></div><br/><br/><br/><br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?99</link>
<title><![CDATA[弹出式窗口，又名popup window]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Wed, 06 Dec 2006 09:49:05 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?99</guid> 
<description>
<![CDATA[ 
	[codes=js]<br/>function MM_openBrWindow(theURL, winName, features) &#123; //v2.0<br/><br/> &nbsp;window.open(theURL,winName,features);<br/><br/> &nbsp;return false;<br/><br/>&#125;<br/>[/codes]<br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?98</link>
<title><![CDATA[文本标签也能提交表单]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Wed, 06 Dec 2006 09:38:42 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?98</guid> 
<description>
<![CDATA[ 
	<div class="code"><br/>&lt;a href=&quot;#&quot; onclick=&quot;document.formname.submit()&quot;&gt;submit botton&lt;/a&gt;<br/></div><br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a> , <a href="http://www.5dhome.net/myblog/tag.php?tag=html" rel="tag">html</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?86</link>
<title><![CDATA[javascript 刷新父窗口并关闭当前窗口]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Fri, 17 Nov 2006 10:35:39 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?86</guid> 
<description>
<![CDATA[ 
	[codes=js]<br/>&lt;script&gt;window.opener.location.reload();window.close();&lt;/script&gt;<br/>[/codes]<br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?84</link>
<title><![CDATA[javascript 关于单选按钮屏蔽其他控件技巧]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Fri, 10 Nov 2006 04:19:20 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?84</guid> 
<description>
<![CDATA[ 
	[codes=js]<br/>// 写在head里面<br/><br/>&lt;script&gt;<br/>function changeSelect()&#123;<br/> if(document.msgform.type_id.checked == true)&#123;<br/> &nbsp;document.msgform.userId.disabled=false;<br/> &nbsp;document.msgform.userEmail.disabled=true;<br/> &#125;<br/> <br/> if(document.msgform.type_email.checked == true)&#123;<br/> &nbsp;document.msgform.userId.disabled=true;<br/> &nbsp;document.msgform.userEmail.disabled=false;<br/> &#125;<br/> <br/>&#125;<br/>&lt;/script&gt;<br/>[/codes]<br/><br/><div class="code"><br/>// 写在body里面，并在onload里面做初始化<br/><br/>&lt;body onload=&quot;changeSelect();&quot;&gt;<br/>&lt;form name=&quot;msgform&quot;&gt;<br/> &nbsp;&lt;label&gt;<br/> &nbsp;&lt;input name=&quot;type&quot; id=&quot;type_id&quot; type=&quot;radio&quot; value=&quot;1&quot; checked=&quot;checked&quot; onclick=&quot;return changeSelect();&quot; /&gt;<br/> &nbsp;&lt;/label&gt;<br/> &nbsp;&lt;label&gt;<br/> &nbsp;&lt;select name=&quot;userId&quot;&gt;<br/> &nbsp; &nbsp;&lt;option&gt;- please select -&lt;/option&gt;<br/> &nbsp; &nbsp;&lt;option value=&quot;1&quot;&gt;1&lt;/option&gt;<br/> &nbsp; &nbsp;&lt;option value=&quot;2&quot;&gt;2&lt;/option&gt;<br/> &nbsp;&lt;/select&gt;<br/> &nbsp;&lt;br /&gt;<br/> &nbsp;&lt;input name=&quot;type&quot; id=&quot;type_email&quot; type=&quot;radio&quot; value=&quot;2&quot; onclick=&quot;return changeSelect();&quot; /&gt;<br/> &nbsp;&lt;/label&gt;<br/> &nbsp;&lt;input name=&quot;userEmail&quot; type=&quot;text&quot; /&gt;<br/>&lt;/form&gt;<br/>&lt;/body&gt;<br/></div><br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><a href="http://www.5dhome.net/myblog/attachment/changeselect.html" target="_blank"><span style="color: #FF4500;">&gt;&gt;查看演示</span></a></div></div><br/><br/><br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=html" rel="tag">html</a> , <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?82</link>
<title><![CDATA[控制表格属性]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Tue, 07 Nov 2006 13:27:50 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?82</guid> 
<description>
<![CDATA[ 
	[codes=js]<br/>&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;<br/>function changeTBg(nowColor)&#123;<br/> &nbsp; &nbsp;tbg.bgColor=nowColor;<br/>&#125;<br/>&lt;/script&gt;<br/>[/codes]<br/><br/><div class="code"><br/>&lt;table width=&quot;50&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; id=&quot;tbg&quot; border=&quot;1&quot;&gt;<br/>&lt;tr&gt;<br/> &nbsp;&lt;td&gt;color&lt;/td&gt;<br/>&lt;/tr&gt;<br/>&lt;/table&gt;<br/><br/>&lt;input name=&quot;b1&quot; type=&quot;button&quot; onClick=&quot;changeTBg(&#039;#ff6600&#039;);&quot; value=&quot;ff6600&quot;&gt;<br/>&lt;input name=&quot;b1&quot; type=&quot;button&quot; onClick=&quot;changeTBg(&#039;#4169E1&#039;);&quot; value=&quot;4169E1&quot;&gt;<br/></div><br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=html" rel="tag">html</a> , <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?81</link>
<title><![CDATA[如何找出一个FORM中所有的checkbox]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Tue, 07 Nov 2006 13:26:04 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?81</guid> 
<description>
<![CDATA[ 
	[codes=js]<br/><br/>var a = document.formName.elements;<br/>var b = [];<br/>for(var i=0; i&lt;a.length; i++)<br/>&#123;<br/>if(a.type==&quot;checkbox&quot;) b[b.length] = a ;<br/>&#125;<br/>alert(b.length);<br/><br/>[/codes]<br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?54</link>
<title><![CDATA[鼠标移动到表格,背景的变化]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Sat, 21 Oct 2006 03:44:08 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?54</guid> 
<description>
<![CDATA[ 
	[codes=js]<br/>//****** 在TR处加以下代码 ******/<br/>// 背景色<br/>bgcolor=&quot;#A6C6E0″<br/><br/>// 鼠标移上去的背景色<br/>onmouseover=&quot;javascript:style.backgroundColor=&#039;#E4EAED&#039;&quot;<br/><br/>// 鼠标移出的背景色<br/>onmouseout=&quot;javascript:style.backgroundColor=&#039;#A6C6E0&#039;&quot; <br/>[/codes]<br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=html" rel="tag">html</a> , <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?53</link>
<title><![CDATA[javascript 验证表单正则表达式]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Sat, 21 Oct 2006 03:30:31 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?53</guid> 
<description>
<![CDATA[ 
	[codes=js]<br/>//************** trim space *******************//<br/>//name: Trim<br/>//target: Trim left/right space<br/>//Parameter: str<br/>//return: (str)<br/><br/>function Trim(str)&#123; &nbsp; <br/> &nbsp;return str.replace(/(^&#92;s*)&#124;(&#92;s*$)/g,&quot;&quot;); &nbsp; <br/>&#125; &nbsp; <br/>[/codes]<br/><br/>[codes=js]<br/>//************** check number *******************//<br/>//name: fucCheckNUM<br/>//target: isnumber<br/>//Parameter: NUM<br/>//return: is true,no false;<br/><br/>function fucCheckNUM(NUM)&#123; &nbsp; <br/> &nbsp;var i,j,strTemp; &nbsp; <br/> &nbsp;strTemp=&quot;0123456789&quot;; &nbsp; <br/> &nbsp;if ( NUM.length== 0)&#123; &nbsp; <br/> &nbsp; &nbsp;return false; &nbsp; <br/> &nbsp;&#125; &nbsp; <br/> &nbsp;<br/> &nbsp;for(i=0;i&lt;NUM.length;i++)&#123; &nbsp; <br/>　　j=strTemp.indexOf(NUM.charAt(i)); &nbsp; <br/>　　if (j==-1)&#123; &nbsp; <br/>　　　return false; &nbsp; <br/>　　&#125; &nbsp; <br/>　&#125; &nbsp; <br/>　return true; &nbsp; <br/>&#125; &nbsp; <br/>[/codes]<br/><br/>[codes=js]<br/>//************** check String *******************//<br/>//name: chksafe<br/>//target: filter `!@#$%^&amp;*()&lt;&gt;?:;&quot;&#039;&#123;&#125;[]+=-_&amp;#124;&#92;<br/>//Parameter: strString<br/>//return: true,false;<br/><br/>function chksafe(strString)&#123; &nbsp; <br/> &nbsp;var myReg = /[&#92;`&#92;!&#92;@&#92;#&#92;$&#92;%&#92;^&#92;&amp;&#92;*&#92;(&#92;)&#92;&lt;&#92;&gt;&#92;?&#92;:&#92;;&#92;&quot;&#92;&#039;&#92;&#123;&#92;&#125;&#92;[&#92;]&#92;+&#92;=&#92;-&#92;_&#92;&#124;&#92;&#92;]/; &nbsp; <br/> &nbsp;if(myReg.test(strString))&#123; &nbsp; <br/> &nbsp; &nbsp;return true; &nbsp; <br/> &nbsp;&#125; &nbsp; <br/> &nbsp;return false; &nbsp; <br/>&#125; &nbsp; <br/>[/codes]<br/><br/>[codes=js]<br/>//************** check date *******************//<br/>//name: Date<br/>//target: judgement Date<br/>//Parameter: strDate<br/>//return: 1,0;<br/>function chkdate(strDate)&#123; &nbsp; <br/> &nbsp;var strLength; &nbsp; <br/> &nbsp;if (strDate != &quot;&quot;) &nbsp; <br/> &nbsp; &nbsp;strLength= strDate.length ; &nbsp; <br/> &nbsp;else &nbsp;<br/> &nbsp; &nbsp;strLength=0; &nbsp; <br/> &nbsp; &nbsp; &nbsp; <br/> &nbsp;var tmpy=&quot;&quot;; &nbsp; <br/> &nbsp;var tmpm=&quot;&quot;; &nbsp; <br/> &nbsp;var tmpd=&quot;&quot;; &nbsp; <br/> &nbsp;var status=0; &nbsp; <br/> &nbsp;<br/> &nbsp;if ( strLength== 0)&#123; &nbsp; <br/> &nbsp; &nbsp;return 0; &nbsp; <br/> &nbsp;&#125; &nbsp; <br/> &nbsp;<br/> &nbsp;for (i=0;i&lt;strLength;i++)&#123; &nbsp; <br/>　　if (strDate.charAt(i)== &#039;-&#039;)&#123; &nbsp; <br/>　　　status++; &nbsp; <br/>　　&#125; &nbsp; <br/> &nbsp;<br/>　　if (status&gt;2)&#123; &nbsp; <br/> &nbsp; &nbsp; &nbsp;return 0; &nbsp; <br/> &nbsp; &nbsp;&#125; &nbsp; <br/> &nbsp;<br/> &nbsp; &nbsp;if ((status==0) &amp;&amp; (strDate.charAt(i)!=&#039;-&#039;))&#123; &nbsp; <br/> &nbsp; &nbsp; &nbsp;tmpy=tmpy+strDate.charAt(i) &nbsp; <br/> &nbsp; &nbsp;&#125; &nbsp; <br/> &nbsp;<br/> &nbsp; &nbsp;if ((status==1) &amp;&amp; (strDate.charAt(i)!=&#039;-&#039;))&#123; &nbsp; <br/> &nbsp; &nbsp; &nbsp;tmpm=tmpm+strDate.charAt(i) &nbsp; <br/> &nbsp; &nbsp;&#125; &nbsp; <br/> &nbsp;<br/> &nbsp; &nbsp;if ((status==2) &amp;&amp; (strDate.charAt(i)!=&#039;-&#039;))&#123; &nbsp; <br/> &nbsp; &nbsp; &nbsp;tmpd=tmpd+strDate.charAt(i) &nbsp; <br/> &nbsp; &nbsp;&#125; &nbsp; <br/> &nbsp;&#125; &nbsp; <br/> &nbsp;<br/> &nbsp;year=new String (tmpy); &nbsp; <br/> &nbsp;month=new String (tmpm); &nbsp; <br/> &nbsp;day=new String (tmpd) &nbsp; <br/> &nbsp; &nbsp; <br/> &nbsp;if ((tmpy.length!=4 ) &#124;&#124; (tmpm.length&gt;2) &#124;&#124; (tmpd.length&gt;2))&#123; &nbsp; <br/> &nbsp; //alert(&quot;Invalid format of date!&quot;); &nbsp; <br/> &nbsp; &nbsp; return 0; &nbsp; <br/> &nbsp;&#125; &nbsp; <br/> &nbsp;<br/> &nbsp;if (!((1&lt;=month) &amp;&amp; (12&gt;=month) &amp;&amp; (31&gt;=day) &amp;&amp; (1&lt;=day)) )&#123; &nbsp; <br/> &nbsp; //alert (&quot;Invalid month or day!&quot;); &nbsp; <br/> &nbsp; &nbsp; return 0; &nbsp; <br/> &nbsp;&#125; &nbsp; <br/> &nbsp;<br/> &nbsp;if (!((year % 4)==0) &amp;&amp; (month==2) &amp;&amp; (day==29))&#123; &nbsp; <br/> &nbsp; //alert (&quot;This is not a leap year!&quot;); &nbsp; <br/> &nbsp; &nbsp; return 0; &nbsp; <br/> &nbsp;&#125; &nbsp; <br/> &nbsp;<br/> &nbsp;if ((month&lt;=7) &amp;&amp; ((month % 2)==0) &amp;&amp; (day&gt;=31))&#123; &nbsp; <br/> &nbsp; //alert (&quot;This month is a small month!&quot;); &nbsp; <br/> &nbsp; &nbsp; return 0; &nbsp; <br/> &nbsp;&#125; &nbsp; <br/> &nbsp;<br/> &nbsp;if ((month&gt;=8) &amp;&amp; ((month % 2)==1) &amp;&amp; (day&gt;=31))&#123; &nbsp; <br/> &nbsp; //alert (&quot;This month is a small month!&quot;); &nbsp; <br/> &nbsp; &nbsp; return 0; &nbsp; <br/> &nbsp;&#125; &nbsp; <br/> &nbsp;<br/> &nbsp;if ((month==2) &amp;&amp; (day==30))&#123; &nbsp; <br/> &nbsp; //alert(&quot;The Febryary never has this day!&quot;); &nbsp; <br/> &nbsp; &nbsp; return 0; &nbsp; <br/> &nbsp;&#125; &nbsp; <br/> &nbsp;<br/> &nbsp;return 1; &nbsp; <br/>&#125; &nbsp;<br/>[/codes]<br/><br/>[codes=js]<br/>//************** isPic *******************//<br/>//name: isPic<br/>//target: judgement path<br/>//Parameter: filePath<br/>//return: true,false;<br/><br/>function isPic(filePath)&#123; &nbsp; <br/> &nbsp;var temp; &nbsp; <br/> &nbsp;var ExtList = &quot;.jpg.gif.bmp.png&quot;; &nbsp; <br/> &nbsp;var the_ext = filePath.substr(filePath.lastIndexOf(&quot;.&quot;)+1).toLowerCase(); &nbsp; <br/> &nbsp;if (ExtList.indexOf(the_ext)==-1)&#123; &nbsp; <br/> &nbsp; &nbsp;return false; &nbsp; <br/> &nbsp;&#125; &nbsp; <br/> &nbsp;return true; &nbsp; <br/>&#125; &nbsp; <br/>[/codes]<br/><br/>[codes=js]<br/>//************** chkWebsites *******************//<br/>//name: chkWebsites<br/>//target: judgement Websites<br/>//Parameter: strWeb<br/>//return: true,false;<br/><br/>function chkWebsites(strEmail) &#123; &nbsp; <br/> &nbsp;var myReg = /^(http:&#92;/&#92;/[a-z0-9]&#123;1,5&#125;&#92;.)+([-&#92;/a-z0-9]+&#92;.)+[a-z0-9]&#123;2,4&#125;$/; &nbsp; <br/> &nbsp;if(myReg.test(strEmail)) return true; &nbsp; <br/> &nbsp;return false; &nbsp; <br/>&#125; &nbsp; <br/><br/>[/codes]<br/><br/>[codes=js]<br/>//************** strlen *******************//<br/>//name: strlen<br/>//target: judgement length<br/>//Parameter: str,num<br/>//return: true,false;<br/><br/>function strlen(str,num)&#123; &nbsp; <br/> &nbsp;if(str &gt; num)&#123; &nbsp; <br/> &nbsp; &nbsp;return true; &nbsp; <br/> &nbsp;&#125; &nbsp; <br/> &nbsp;return false; &nbsp; <br/>&#125; <br/>[/codes]<br/><br/><br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?52</link>
<title><![CDATA[超强的javascript读取xml结合生成树]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Sat, 21 Oct 2006 03:22:37 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?52</guid> 
<description>
<![CDATA[ 
	<br/><img src="http://www.5dhome.net/myblog/template/DarkBlue/images/viewimage.gif" alt=""/><a href="http://www.5dhome.net/myblog/attachment/js_xmltree.gif" target="_blank">点击在新窗口中浏览此图片</a><br/><a href="http://www.5dhome.net/myblog/attachment/js_xmltree.gif" target="_blank">http://www.5dhome.net/mybl...</a><br/><br/><br/><a href="attachment/xmltree.zip">点击这里下载文件</a><br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a> , <a href="http://www.5dhome.net/myblog/tag.php?tag=xml" rel="tag">xml</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?51</link>
<title><![CDATA[javascript制作的二级菜单 [支持多种浏览器]]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Sat, 21 Oct 2006 03:20:41 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?51</guid> 
<description>
<![CDATA[ 
	可根据不同的服务器脚本（asp &#124; &nbsp;php &#124; jsp等）作相应的改变，head中间script的城市列表和body中间的省份列表可用服务器脚本循环生成，这里介绍的是javascript，所以就不介绍服务器脚本语言。<br/><br/><a href="http://www.5dhome.net/demo/js/changeProvince.html" target="_blank"><span style="color: #DC143C;">&gt;&gt; 演示地址及源码</span></a><br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?50</link>
<title><![CDATA[javascript图片变化效果]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[javascript &amp; dhtml]]></category>
<pubDate>Sat, 21 Oct 2006 03:15:09 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?50</guid> 
<description>
<![CDATA[ 
	javascript图片变化效果，点击小图片，大图片变化，可以用于相册<br/>[codes=js]<br/><br/>function selectedPic(id,src)&#123; &nbsp; <br/> &nbsp;<br/> &nbsp; &nbsp;var imgObj=document.getElementById(id); &nbsp; <br/> &nbsp;<br/> &nbsp; &nbsp;if(imgObj) imgObj.src=src; &nbsp; <br/> &nbsp;<br/> &nbsp; &nbsp;return false; &nbsp; <br/> &nbsp;<br/>&#125; &nbsp; <br/><br/>[/codes]<br/><br/><a href="http://www.5dhome.net/demo/js/selectedPic/demo.html" target="_blank">演示效果</a><br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=javascript" rel="tag">javascript</a>
]]>
</description>
</item>
</channel>
</rss>