<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_asp.net</title><subtitle type="text">asp.net,c#</subtitle><id>http://feed.cnblogs.com/blog/u/15723/rss</id><updated>2012-02-07T02:46:26Z</updated><author><name>灵魂边缘</name><uri>http://www.cnblogs.com/SoulEdge/</uri></author><generator>CNBlogs BlogServer</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/SoulEdge/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/15723/rss"/><entry><id>http://www.cnblogs.com/SoulEdge/archive/2012/02/07/2340966.html</id><title type="text">The IE &amp;#39;non-disappearing content&amp;#39; bug</title><summary type="text">The bugIn Internet Explorer (IE) 6, 7 and 8 in &amp;#39;Compatibility View&amp;#39; there is a bug when hiding content within a hidden container element. The content will remain visible, even though its &amp;#39;display&amp;#39; property is &amp;#39;none&amp;#39;, as can be observed when the container is re-shown again. Tr</summary><published>2012-02-07T02:46:00Z</published><updated>2012-02-07T02:46:00Z</updated><author><name>灵魂边缘</name><uri>http://www.cnblogs.com/SoulEdge/</uri></author><link rel="alternate" href="http://www.cnblogs.com/SoulEdge/archive/2012/02/07/2340966.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/SoulEdge/archive/2012/02/07/2340966.html"/><content type="html">&lt;div&gt;&lt;div&gt;&lt;p&gt;&lt;strong&gt;The bug&lt;/strong&gt;&lt;/p&gt;In Internet Explorer (IE) 6, 7 and 8 in 'Compatibility View'  there is a bug when &lt;strong&gt;hiding content within a hidden container element.  The content will remain visible, even though its 'display' property is  'none'&lt;/strong&gt;, as can be observed when the container is re-shown again. &lt;br /&gt; &lt;p&gt;&lt;strong&gt;Try it&lt;/strong&gt;&lt;/p&gt;Top left is a container element (red square) containing an image  (rabbit in hat). Perform the steps below (Note: order matters!) to see the bug,  when viewed in IE6, IE7 or IE8 in 'Compatibility View'.  &lt;ol&gt; &lt;li&gt;Set both the container and the rabbit to position: 'absolute' or 'relative'.   &lt;/li&gt;&lt;li&gt;Set the container to display: 'none'.  &lt;/li&gt;&lt;li&gt;Set the rabbit to display: 'none'.  &lt;/li&gt;&lt;li&gt;Set the container to display: 'block' again.&lt;br /&gt;&lt;strong&gt;On  IE6/7/8CompatView, the rabbit will still be visible, even though its display=  'none'!&lt;/strong&gt; (as can be checked in IE's Web-developer toolbar, see  screenshot below). Once more setting the rabbit to display= 'none' doesn't help,  the rabbit remains visible. &lt;/li&gt;&lt;/ol&gt;&lt;img id="imgDevToolBar" src="http://www.positioniseverything.net/explorer/ienondisappearcontentbugPIE/devbar_displayisnone.gif"  alt="" /&gt; &lt;br /&gt;&lt;br /&gt; &lt;p&gt;&lt;strong&gt;So what!? Isn't this a quite obscure situation?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The bug may be encountered in real life in a situation as shown top right  (actually, this was how I ran in to it). There is a set of tabbed pages. Each  tabbed page keeps its content in a separate container &amp;lt;div&amp;gt;. If tab 1 is  selected, container &amp;lt;div 1&amp;gt; is shown (&lt;em&gt;hence, the other container  &amp;lt;div&amp;gt;s are hidden)&lt;/em&gt;, if tab 2 is selected, container &amp;lt;div 2&amp;gt; is  shown, etc. &lt;br /&gt;&lt;br /&gt;Initially tab 1 is selected. Hence, tab's 2 container  &amp;lt;div&amp;gt; is hidden (display='none'). Now for the problem: inside tab's 2  container &amp;lt;div&amp;gt; happens to be a stack of images. Some of these images  should be initially hidden. In this example it's a series of images of a model,  supposedly at different ages. Initially, all images but the '10 year old'-one  are hidden, &lt;em&gt;so when you switch to Tab 2 for the first time, you should only  see the '10 year old' picture&lt;/em&gt;. &lt;br /&gt;&lt;br /&gt;This is were IE's bug shows up: as  container &amp;lt;div 2&amp;gt; was set to display= 'none', the images contained within  this &amp;lt;div&amp;gt; were 'immune' for the property 'display= none' imposed on them,  and &lt;em&gt;didn't disappear&lt;/em&gt;. Hence, &lt;em&gt;all images of the stack will be  seen&lt;/em&gt; when tab 2 is chosen... &lt;br /&gt;&lt;br /&gt;One may 'break the IE spell' by  clicking the (+) button seven times. Basically, this resets all the 'immunized'  images to 'display= block' (Work-around nr 1 mentioned below). Thereafter, the  hiding of the images will work correctly again. &lt;/p&gt;&lt;br /&gt; &lt;p&gt;&lt;strong&gt;Details&lt;/strong&gt;&lt;/p&gt;The bug occurs in the following situation:  &lt;ul&gt; &lt;li&gt;In IE6, IE7 and IE8 in 'Compatibility View'. Doesn't occur in IE8 in default  view, Firefox3, Opera9, Safari3 on Windows, Safari 3 on Mac, Chrome1.  &lt;/li&gt;&lt;li&gt;Both the container and the content need to be positioned non-static, so:  &lt;em&gt;absolute&lt;/em&gt; or &lt;em&gt;relative&lt;/em&gt;.  &lt;/li&gt;&lt;li&gt;The container must be hidden ('display= 'none') &lt;em&gt;before&lt;/em&gt; the content  is hidden. If the order of hiding is the other way around, the bug does not  occur.  &lt;/li&gt;&lt;li&gt;The bug only occurs if the container is hidden &lt;em&gt;after&lt;/em&gt; the page has  fully loaded. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Work arounds&lt;/strong&gt;&lt;/p&gt;One may 'release the spell' in a number of ways:  &lt;ol&gt; &lt;li&gt;temporarily switch the content's (=rabbit's) &lt;strong&gt;display&lt;/strong&gt;  property to 'block' and back to 'none'.  &lt;/li&gt;&lt;li&gt;temporarily switch the content's (=rabbit's) &lt;strong&gt;position&lt;/strong&gt;  property from 'relative' to 'absolute' and back, or vice versa.  &lt;/li&gt;&lt;li&gt;temporarily switch the content's (=rabbit's) &lt;strong&gt;visibility&lt;/strong&gt;  property to 'hidden' and back. &lt;em&gt;(But this only works if the content (=rabbit)  is positioned absolutely! The wonderful world of IE...)&lt;/em&gt; &lt;/li&gt;&lt;/ol&gt;One may  also 'overrule' the incorrectly displayed content by:  &lt;ul&gt; &lt;li&gt;additionally setting the content's (=rabbit's) 'visibility' property to  'hidden'. &lt;a href="http://groups.google.com/group/jquery-en/browse_thread/thread/429f63dcb679da23#"&gt;Courtesy  to: Ricardo Tomasi, who brought up this fix in the jQuery discussion group where  this issue was first discussed.&lt;/a&gt; This workaround however has the drawback of  having &lt;em&gt;two&lt;/em&gt; properties ('display' and 'visibility') simultaneously  hiding the content. To re-show the content, both properties will have to be  reset. &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;This issue was first discussed in: &lt;a href="http://groups.google.com/group/jquery-en/browse_thread/thread/429f63dcb679da23#"&gt;http://groups.google.com/group/jquery-en/browse_thread/thread/429f63dcb679da23#&lt;/a&gt;.  &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/SoulEdge/aggbug/2340966.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/SoulEdge/archive/2012/02/07/2340966.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/SoulEdge/archive/2011/12/28/2304849.html</id><title type="text">10个强大的Javascript表单验证插件推荐</title><summary type="text">创建一个JavaScript表单验证插件，可以说是一个繁琐的过程，涉及到初期设计、开发与测试等等环节。实际上一个优秀的程序员不仅是技术高手，也应该是善假于外物的。本文介绍了10个不错的JavaScript表单验证插件，使用它们完全可以节省你的时间！希望你喜欢。1.validate.jsValidate.js是一个非常不错的JavaScript表单验证库，源于CodeIgniter API。该库相当轻巧（不到1KB），不要求任何JavaScript框架，可以在所有主流浏览器中运行（包括IE 6）。2.Zebra FormZebra_Form是一个免费的PHP库，它能够很好地处理表单验证。你只需使</summary><published>2011-12-28T07:17:00Z</published><updated>2011-12-28T07:17:00Z</updated><author><name>灵魂边缘</name><uri>http://www.cnblogs.com/SoulEdge/</uri></author><link rel="alternate" href="http://www.cnblogs.com/SoulEdge/archive/2011/12/28/2304849.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/SoulEdge/archive/2011/12/28/2304849.html"/><content type="html">&lt;span  style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #f7f7f7; "&gt;创建一个JavaScript表单验证插件，可以说是一个繁琐的过程，涉及到初期设计、开发与测试等等环节。实际上一个优秀的程序员不仅是技术高手，也应该是善假于外物的。本文介绍了10个不错的JavaScript表单验证插件，使用它们完全可以节省你的时间！希望你喜欢。&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;strong style="font-weight: bold; "&gt;1.&amp;nbsp;&lt;a href="http://rickharrison.github.com/validate.js/" target="_blank" style="color: #006699; text-decoration: underline; "&gt;validate.js&lt;/a&gt;&lt;/strong&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; "&gt;&lt;img src="http://dl.iteye.com/upload/attachment/611899/af4fc6e1-1684-3dfe-820b-e4c76cb1e7cb.jpg" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "  alt="" /&gt;&lt;/div&gt;&lt;br /&gt;Validate.js是一个非常不错的JavaScript表单验证库，源于CodeIgniter API。该库相当轻巧（不到1KB），不要求任何JavaScript框架，可以在所有主流浏览器中运行（包括IE 6）。&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;strong style="font-weight: bold; "&gt;2.&amp;nbsp;&lt;a href="http://stefangabos.ro/php-libraries/zebra-form/" target="_blank" style="color: #006699; text-decoration: underline; "&gt;Zebra Form&lt;/a&gt;&lt;/strong&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; "&gt;&lt;img src="http://dl.iteye.com/upload/attachment/611901/cce3f279-e32e-36f6-a1f6-e31bc1825ced.jpg" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "  alt="" /&gt;&lt;/div&gt;&lt;br /&gt;Zebra_Form是一个免费的PHP库，它能够很好地处理表单验证。你只需使用少量的PHP代码即可设计一个安全、别致的表单。Zebra_Form在前端集成了jQuery，用以显示警告及错误提示。&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;strong style="font-weight: bold; "&gt;3.&amp;nbsp;&lt;a href="http://www.jformer.com/" target="_blank" style="color: #006699; text-decoration: underline; "&gt;jFormer&lt;/a&gt;&lt;/strong&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; "&gt;&lt;img src="http://dl.iteye.com/upload/attachment/611903/a03222d3-2375-3faf-b9fc-2c8c6c858555.jpg" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "  alt="" /&gt;&lt;/div&gt;&lt;br /&gt;jFormer是一个基于jQuery的表单框架，允许你生成漂亮、兼容标准的表单。功能包括：客户端验证；服务器端验证；Ajax提交；可通过CSS定制外观；验证码支持；通用表单模板等。&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;strong style="font-weight: bold; "&gt;4.&amp;nbsp;&lt;a href="http://validval.frebsite.nl/" target="_blank" style="color: #006699; text-decoration: underline; "&gt;jQuery.validVal&lt;/a&gt;&lt;/strong&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; "&gt;&lt;img src="http://dl.iteye.com/upload/attachment/611905/ab6ca54e-968c-35e1-bcdb-6d25a279d1d7.jpg" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "  alt="" /&gt;&lt;/div&gt;&lt;br /&gt;jQuery.validVal插件旨在简化表单验证功能。此插件可用于任意的HTML表单（包括Ajax异步加载的），通过定义各种验证规则实现表单的验证功能。&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;strong style="font-weight: bold; "&gt;5.&amp;nbsp;&lt;a href="http://validity.thatscaptaintoyou.com/" target="_blank" style="color: #006699; text-decoration: underline; "&gt;Validity&lt;/a&gt;&lt;/strong&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; "&gt;&lt;img src="http://dl.iteye.com/upload/attachment/611907/a4fd62d8-249a-38cd-b87f-c9cfc2e1923c.jpg" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "  alt="" /&gt;&lt;/div&gt;&lt;br /&gt;Validity是一个强大灵活的jQuery表单框架，可实现客户端和服务器端同时验证。它只有9KB大小，能够执行各种简单或是复杂的验证，包括动态的或设定条件的验证。该插件还可以控制验证信息将如何显示，使其与网站的外观/风格相适应。&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong style="font-weight: bold; "&gt;6.&amp;nbsp;&lt;a href="http://validformbuilder.org/" target="_blank" style="color: #006699; text-decoration: underline; "&gt;ValidForm Builder&lt;/a&gt;&lt;/strong&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; "&gt;&lt;img src="http://dl.iteye.com/upload/attachment/611909/d03a9744-f098-316a-bbb7-7406b74bfc5d.jpg" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "  alt="" /&gt;&lt;/div&gt;&lt;br /&gt;ValidForm Buider是一个简单的、使用XHTML 1.0和CSS的Web表单生成工具。它是一个开源的PHP和JavaScript（jQuery）库，非常不错，可快速安全地制作出专业的Web验证表单。&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;strong style="font-weight: bold; "&gt;7.&amp;nbsp;&lt;a href="http://demos.usejquery.com/ketchup-plugin/" target="_blank" style="color: #006699; text-decoration: underline; "&gt;Ketchup&lt;/a&gt;&lt;/strong&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; "&gt;&lt;img src="http://dl.iteye.com/upload/attachment/611911/e482adac-04ca-384c-99b9-0429f4496ce4.jpg" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "  alt="" /&gt;&lt;/div&gt;&lt;br /&gt;Ketchup是一个易于定制（从外观至功能）的jQuery表单插件，可用于客户端对用户表单进行验证。&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;strong style="font-weight: bold; "&gt;8.&amp;nbsp;&lt;a href="http://validatious.org/" target="_blank" style="color: #006699; text-decoration: underline; "&gt;Validatious&lt;/a&gt;&lt;/strong&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; "&gt;&lt;img src="http://dl.iteye.com/upload/attachment/611913/2dddc123-452c-3cc1-8dd9-d099fdc7cc54.jpg" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "  alt="" /&gt;&lt;/div&gt;&lt;br /&gt;Validatous是一个易于使用的Unobtrusive JavaScript表单验证库，不依赖于任何JS框架。内置数值、e-mail、URL、最大/最小字符数验证等功能。&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong style="font-weight: bold; "&gt;9.&amp;nbsp;&lt;a href="http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/" target="_blank" style="color: #006699; text-decoration: underline; "&gt;Form Validator&lt;/a&gt;&lt;/strong&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; "&gt;&lt;img src="http://dl.iteye.com/upload/attachment/611915/d5cf460d-e28a-34d4-9a30-9900a6e9df8e.jpg" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "  alt="" /&gt;&lt;/div&gt;&lt;br /&gt;功能广泛的表单验证方案，适用于任何表单。验证失败时将弹出浮动错误提示。&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;strong style="font-weight: bold; "&gt;10.&amp;nbsp;&lt;a href="http://vanadiumjs.com/" target="_blank" style="color: #006699; text-decoration: underline; "&gt;VanadiumJS&lt;/a&gt;&lt;/strong&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; "&gt;&lt;img src="http://dl.iteye.com/upload/attachment/611917/0ed59220-1d61-3ab0-a9f6-a5abff37446f.jpg" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "  alt="" /&gt;&lt;/div&gt;&lt;br /&gt;非常直观而强大的客户端验证插件。&amp;nbsp;&lt;/span&gt;&lt;img src="http://www.cnblogs.com/SoulEdge/aggbug/2304849.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/SoulEdge/archive/2011/12/28/2304849.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/SoulEdge/archive/2011/03/09/1978182.html</id><title type="text">使用javascript检测客户端是否是mobile的类型，如果是就跳转到另外一个页面</title><summary type="text">&amp;lt;script language=&amp;quot;javascript&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt; function Client() { } Client.prototype.mobileClients = [ &amp;quot;midp&amp;quot;, &amp;quot;240x320&amp;quot;, &amp;quot;blackberry&amp;quot;, &amp;quot;netfront&amp;quot;, &amp;quot;nokia&amp;quot;, &amp;quot;panasonic&amp;quot;, &amp;quot;portalmmm&amp;quot;, &amp;quot;sharp&amp;q</summary><published>2011-03-09T05:01:00Z</published><updated>2011-03-09T05:01:00Z</updated><author><name>灵魂边缘</name><uri>http://www.cnblogs.com/SoulEdge/</uri></author><link rel="alternate" href="http://www.cnblogs.com/SoulEdge/archive/2011/03/09/1978182.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/SoulEdge/archive/2011/03/09/1978182.html"/><content type="html">&lt;div&gt;&lt;div&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;function Client() { }&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Client.prototype.mobileClients = [&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"midp",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"240x320",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"blackberry",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"netfront",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"nokia",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"panasonic",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"portalmmm",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"sharp",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"sie-",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"sonyericsson",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"symbian",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"windows ce",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"benq",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"mda",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"mot-",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"opera mini",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"philips",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"pocket pc",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"sagem",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"samsung",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"sda",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"sgh-",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"vodafone",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"xda",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"iphone",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"android",&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"ipad"&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;];&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Client.prototype.isMobileClient = function(userAgent) {&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;userAgent = userAgent.toLowerCase();&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (var i in this.mobileClients) {&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (userAgent.indexOf(this.mobileClients[i]) != -1) {&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return true;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return false;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var client = new Client();&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (client.isMobileClient(navigator.userAgent)) {&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;window.location.href = "http://mobile.html";&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/script&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/SoulEdge/aggbug/1978182.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/SoulEdge/archive/2011/03/09/1978182.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/SoulEdge/archive/2011/02/17/1957251.html</id><title type="text">在javascript中对一个对象数组进行排序</title><summary type="text">function sort(photoes) { var temp, j; for (var i = 1; i &amp;lt; photoes.length; i++) { if (compare(photoes[i], photoes[i - 1]) == -1) { temp = photoes[i]; j = i - 1; do { photoes[j + 1] = photoes[j]; j--; } while (j &amp;gt; -1 &amp;amp;&amp;amp; compare(temp, photoes[j]) == -1); photoes[j + 1] = temp; } //endif }</summary><published>2011-02-17T09:11:00Z</published><updated>2011-02-17T09:11:00Z</updated><author><name>灵魂边缘</name><uri>http://www.cnblogs.com/SoulEdge/</uri></author><link rel="alternate" href="http://www.cnblogs.com/SoulEdge/archive/2011/02/17/1957251.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/SoulEdge/archive/2011/02/17/1957251.html"/><content type="html">&lt;p&gt;function sort(photoes) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var temp, j;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i = 1; i &amp;lt; photoes.length; i++) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (compare(photoes[i], photoes[i - 1]) == -1) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; temp = photoes[i];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; j = i - 1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; photoes[j + 1] = photoes[j];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; j--;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (j &amp;gt; -1 &amp;amp;&amp;amp; compare(temp, photoes[j]) == -1);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; photoes[j + 1] = temp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } //endif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;&#xD;
&lt;p&gt;function compare(p1, p2) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var n1 = p1.src;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; n1 = n1.substr(n1.lastIndexOf('/') + 1);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var n2 = p2.src;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; n2 = n2.substr(n2.lastIndexOf('/') + 1);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (n1 &amp;lt; n2) return -1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (n1 == n2) return 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else return 1;&lt;br /&gt;}&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;BTW:这个例子中photos是一个html image element的数组.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/SoulEdge/aggbug/1957251.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/SoulEdge/archive/2011/02/17/1957251.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/SoulEdge/archive/2011/02/17/1957235.html</id><title type="text">Devenv /ResetSkipPkgs</title><summary type="text">我的vs 2008从安装上就有一个问题：没有web designer。打开一个aspx页面，没有designer视图，只有source视图；并且source视图也和一般文本编辑器一样，没有任何tag标记和辅助编辑功能。重装几次，搞了一个早上还是没有解决。然后试了一下Devenv /ResetSkipPkgs命令，居然就好了......查了一下Devenv /ResetSkipPkgs这个命令参数的说明：Clears all options to skip loading added to VSPackages by users wishing to avoid loading problem </summary><published>2011-02-17T08:55:00Z</published><updated>2011-02-17T08:55:00Z</updated><author><name>灵魂边缘</name><uri>http://www.cnblogs.com/SoulEdge/</uri></author><link rel="alternate" href="http://www.cnblogs.com/SoulEdge/archive/2011/02/17/1957235.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/SoulEdge/archive/2011/02/17/1957235.html"/><content type="html">&lt;p&gt;我的vs 2008从安装上就有一个问题：没有web designer。打开一个aspx页面，没有designer视图，只有source视图；并且source视图也和一般文本编辑器一样，没有任何tag标记和辅助编辑功能。重装几次，搞了一个早上还是没有解决。然后试了一下Devenv /ResetSkipPkgs命令，居然就好了......&lt;/p&gt;&#xD;
&lt;p&gt;查了一下Devenv /ResetSkipPkgs这个命令参数的说明：&lt;/p&gt;&#xD;
&lt;p&gt;&lt;span style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: medium Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" &gt;&lt;span style="text-align: left; font-family: 'Segoe UI', Verdana, Arial; font-size: 13px" &gt;Clears all options to skip loading added to VSPackages by users wishing to avoid loading problem VSPackages, then starts Visual Studio.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;因此猜测是我的vs 2008有一些加载选项导致web designer不能加载，并且这些选项会保存在我的电脑上（估计是注册表），所以重装也没用。Devenv /ResetSkipPkgs可以清除这些选项。&lt;/p&gt;&lt;img src="http://www.cnblogs.com/SoulEdge/aggbug/1957235.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/SoulEdge/archive/2011/02/17/1957235.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/SoulEdge/archive/2009/12/30/1635885.html</id><title type="text">Invalid Viewstate error and how to fix it?</title><summary type="text">We have been getting some questions regarding viewstate-related errors like &amp;#8220;The viewstate is invalid for this page and might be corrupted&amp;#8221;This error is usually caused by the asp worker pr...</summary><published>2009-12-30T04:25:00Z</published><updated>2009-12-30T04:25:00Z</updated><author><name>灵魂边缘</name><uri>http://www.cnblogs.com/SoulEdge/</uri></author><link rel="alternate" href="http://www.cnblogs.com/SoulEdge/archive/2009/12/30/1635885.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/SoulEdge/archive/2009/12/30/1635885.html"/></entry><entry><id>http://www.cnblogs.com/SoulEdge/archive/2009/12/18/1626979.html</id><title type="text">在asp.net中如何管理cache</title><summary type="text">介绍: 在我解释cache管理机制时，首先让我阐明下一个观念：IE下面的数据管理。每个人都会用不同的方法去解决如何在IE在管理数据。有的会提到用状态管理，有的提到的cache管理，这里我比较喜欢cache管理，因为本人比较喜&amp;#8220;cache&amp;#8221;这个词。但是状态管理和cache管理这两个在概念和意义上是不同的，下面就让我们来讨论下两都在各个方面的不同之处。 虽然cache管理并不存...</summary><published>2009-12-18T02:58:00Z</published><updated>2009-12-18T02:58:00Z</updated><author><name>灵魂边缘</name><uri>http://www.cnblogs.com/SoulEdge/</uri></author><link rel="alternate" href="http://www.cnblogs.com/SoulEdge/archive/2009/12/18/1626979.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/SoulEdge/archive/2009/12/18/1626979.html"/></entry><entry><id>http://www.cnblogs.com/SoulEdge/archive/2009/11/27/1611809.html</id><title type="text">用Javascript取得URL参数(Get URL parameters/query string using Javascript)</title><summary type="text">在Asp.net后台代码中要取得URL参数非常简单，用Request.QueryString["paramName"]就可以了。有时候我想在Javascript里面也能得到URL参数，可是查了一下没有在Javascript内置的方法里面找到，于是自己写了个方法：function getQueryString( paramName ){ 　　paramName = paramName .replac...</summary><published>2009-11-27T02:13:00Z</published><updated>2009-11-27T02:13:00Z</updated><author><name>灵魂边缘</name><uri>http://www.cnblogs.com/SoulEdge/</uri></author><link rel="alternate" href="http://www.cnblogs.com/SoulEdge/archive/2009/11/27/1611809.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/SoulEdge/archive/2009/11/27/1611809.html"/></entry><entry><id>http://www.cnblogs.com/SoulEdge/archive/2009/11/10/1599943.html</id><title type="text">用JavaScript对表格排序</title><summary type="text">1.你真的懂JavaScript里面的Sort方法吗？ 2.你知道JavaScript中 localeCompare 方法的函数体吗？3.表格排序 方法 要哪些参数？　　JavaScript中的sort方法直接就提供了排序的功能，不需要我们自己写个循环一个个的判断。但其机制仍然是那样的，[代码]输出的结果为 gray,green,red;那如果为整数呢？[代码]如果你认为是 2，7，25 ；那么很...</summary><published>2009-11-10T07:14:00Z</published><updated>2009-11-10T07:14:00Z</updated><author><name>灵魂边缘</name><uri>http://www.cnblogs.com/SoulEdge/</uri></author><link rel="alternate" href="http://www.cnblogs.com/SoulEdge/archive/2009/11/10/1599943.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/SoulEdge/archive/2009/11/10/1599943.html"/></entry><entry><id>http://www.cnblogs.com/SoulEdge/archive/2009/11/03/1595293.html</id><title type="text">使用 jQuery 简化 Ajax 开发</title><summary type="text">jQuery 是一个JavaScript 库，它有助于简化 JavaScript&amp;#8482; 以及 Asynchronous JavaScript + XML (Ajax) 编程。与类似的 JavaScript 库不同，jQuery 具有独特的基本原理，可以简洁地表示常见的复杂代码。学习 jQuery 基本原理，探索其特性和功能，执行一些常见的 Ajax 任务并掌握如何使用插件扩展 jQuery...</summary><published>2009-11-03T07:37:00Z</published><updated>2009-11-03T07:37:00Z</updated><author><name>灵魂边缘</name><uri>http://www.cnblogs.com/SoulEdge/</uri></author><link rel="alternate" href="http://www.cnblogs.com/SoulEdge/archive/2009/11/03/1595293.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/SoulEdge/archive/2009/11/03/1595293.html"/></entry></feed>
