<?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>我的职业生涯(前端开发)</title>
	<atom:link href="http://www.smuwcwt.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.smuwcwt.com</link>
	<description>希望就在前方</description>
	<lastBuildDate>Wed, 25 Apr 2012 22:17:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>jquery的checkbox全选，反选</title>
		<link>http://www.smuwcwt.com/archives/683</link>
		<comments>http://www.smuwcwt.com/archives/683#comments</comments>
		<pubDate>Wed, 25 Apr 2012 21:38:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端开发]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[全选]]></category>

		<guid isPermaLink="false">http://www.smuwcwt.com/?p=683</guid>
		<description><![CDATA[jquery搞全选的时候，差点没让我吐血。好吧，我认输，记录。 全选： $(&#039;input[name=&#34;uid&#34;]:checkbox&#039;).attr(&#039;checked&#039;,true); 全不选： $(&#039;input[name=&#34;uid&#34;]:checkbox&#039;).attr(&#039;checke... </p>
Related posts:<ol>
<li><a href='http://www.smuwcwt.com/archives/151' rel='bookmark' title='jquery实现记录的全选和全取消'>jquery实现记录的全选和全取消</a></li>
<li><a href='http://www.smuwcwt.com/archives/441' rel='bookmark' title='jquery1.4发布了'>jquery1.4发布了</a></li>
<li><a href='http://www.smuwcwt.com/archives/507' rel='bookmark' title='我的第一个jquery小插件'>我的第一个jquery小插件</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>jquery搞全选的时候，差点没让我吐血。好吧，我认输，记录。</p>
<p>全选：</p>
<pre class="brush: js; ">
$(&#039;input[name=&quot;uid&quot;]:checkbox&#039;).attr(&#039;checked&#039;,true);
</pre>
<p>全不选：</p>
<pre class="brush: js; ">
$(&#039;input[name=&quot;uid&quot;]:checkbox&#039;).attr(&#039;checked&#039;,false);
</pre>
<pre class="brush: js; ">
$(&#039;input[name=&quot;uid&quot;]:checkbox&#039;).removeAttr(&#039;checked&#039;);
</pre>
<p>反选：</p>
<pre class="brush: js; ">
$(&#039;input[name=&quot;uid&quot;]:checkbox&#039;).attr(&#039;checked&#039;,!$(this).attr(&#039;checked&#039;));
</pre>
<p>选中：</p>
<pre class="brush: js; ">

$(&#039;input[name=&quot;uid&quot;]:checkbox:checked&#039;).each(function(){
alert($(this).val());
});
</pre>
<p>选中的值，这里有个特别的地方，如果你点击全选的话，在【开发人员工具】或者【FireBug】里会添加上checked=checked属性，但点击本身的checkbox不会修改此属性值，所以，如果获取选中结果如果使用：</p>
<pre class="brush: js; ">

 $(&#039;input[name=&quot;uid&quot;]:checkbox&#039;).each(function(){
if($(this).attr(&#039;checkbox&#039;)) {
alert($(this).val());
}
});
</pre>
<p>这样的代码，那就是个悲剧。</p>
<p>Related posts:<ol>
<li><a href='http://www.smuwcwt.com/archives/151' rel='bookmark' title='jquery实现记录的全选和全取消'>jquery实现记录的全选和全取消</a></li>
<li><a href='http://www.smuwcwt.com/archives/441' rel='bookmark' title='jquery1.4发布了'>jquery1.4发布了</a></li>
<li><a href='http://www.smuwcwt.com/archives/507' rel='bookmark' title='我的第一个jquery小插件'>我的第一个jquery小插件</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.smuwcwt.com/archives/683/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>父元素relative子元素absolute,IE6下子元素无法自适应宽度</title>
		<link>http://www.smuwcwt.com/archives/680</link>
		<comments>http://www.smuwcwt.com/archives/680#comments</comments>
		<pubDate>Wed, 25 Apr 2012 21:18:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端开发]]></category>
		<category><![CDATA[absolute]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[relative]]></category>

		<guid isPermaLink="false">http://www.smuwcwt.com/?p=680</guid>
		<description><![CDATA[二种情况： 1. 子元素定位到拥有高度的父元素内某一位置，一般注意父元素的padding，width，height不会有问题。 2. 子元素定位到超出父元素区域，一般用在提示，随着项目越来越大，维护的代价... </p>
Related posts:<ol>
<li><a href='http://www.smuwcwt.com/archives/53' rel='bookmark' title='常用的正则表达式'>常用的正则表达式</a></li>
<li><a href='http://www.smuwcwt.com/archives/314' rel='bookmark' title='巧用负margin实现导航菜单分割符'>巧用负margin实现导航菜单分割符</a></li>
<li><a href='http://www.smuwcwt.com/archives/555' rel='bookmark' title='据说是Google的display:inline-block'>据说是Google的display:inline-block</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>二种情况：</p>
<p>1. 子元素定位到拥有高度的父元素内某一位置，一般注意父元素的padding，width，height不会有问题。</p>
<p>2. 子元素定位到超出父元素区域，一般用在提示，随着项目越来越大，维护的代价也相应增大，感觉具有针对性固定的提示，还是写在触发元素附近比较靠谱，需求的频繁变动影响也小。但是出现一个问题，IE6子元素宽度会被自动适应到父元素的宽度，并不会根据文字的多少自适应大小。目前的解决方案是设置提示层的宽度。</p>
<p>如果需要自适应到父元素的宽度，需要保持提示层里不出现块级元素，或者将块级元素inline-block。   <br />如果需要超过父元素的宽度并且保持单行，需要white-space:nowrap，当然提示层也不会有太多的文本。</p>
<p>Related posts:<ol>
<li><a href='http://www.smuwcwt.com/archives/53' rel='bookmark' title='常用的正则表达式'>常用的正则表达式</a></li>
<li><a href='http://www.smuwcwt.com/archives/314' rel='bookmark' title='巧用负margin实现导航菜单分割符'>巧用负margin实现导航菜单分割符</a></li>
<li><a href='http://www.smuwcwt.com/archives/555' rel='bookmark' title='据说是Google的display:inline-block'>据说是Google的display:inline-block</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.smuwcwt.com/archives/680/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>【转载】机关枪式的全中</title>
		<link>http://www.smuwcwt.com/archives/677</link>
		<comments>http://www.smuwcwt.com/archives/677#comments</comments>
		<pubDate>Tue, 13 Mar 2012 04:14:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端开发]]></category>

		<guid isPermaLink="false">http://www.smuwcwt.com/?p=677</guid>
		<description><![CDATA[作者说是企鹅村的，我想应该是TX吧。如果他们都这样，其实我还是欣慰的。哈哈。 1. psd 文件尺寸 竟然有71M，内存不够 2. psd 图层上百个，各种看不懂的图层。毫无规律的图层分组让人菊花一... </p>
No related posts.]]></description>
			<content:encoded><![CDATA[<p>作者说是企鹅村的，我想应该是TX吧。如果他们都这样，其实我还是欣慰的。哈哈。</p>
<blockquote><p>1. psd 文件尺寸 竟然有71M，内存不够      <br />2. psd 图层上百个，各种看不懂的图层。毫无规律的图层分组让人菊花一紧。       <br />3. 设计稿完全是个插画，怎么看都不像个网页，无从下手切图。       <br />4. GUI为矢量图，边界不清晰。切图成果，糊得一B。</p>
</blockquote>
<p>详情看这里：http://ucdchina.com/snap/11617</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.smuwcwt.com/archives/677/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>select使用append进option无法自适应宽度</title>
		<link>http://www.smuwcwt.com/archives/673</link>
		<comments>http://www.smuwcwt.com/archives/673#comments</comments>
		<pubDate>Wed, 29 Feb 2012 15:23:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[随便]]></category>

		<guid isPermaLink="false">http://www.smuwcwt.com/?p=673</guid>
		<description><![CDATA[select备受鄙视，前端中会碰到各式各样的问题，例如： 1，弹出层无法阻挡select 2，宽度，高度受系统影响，甚至连系统主题都影响select的宽高 等等。 今天碰到这样一个问题，后台系统再做3级... </p>
No related posts.]]></description>
			<content:encoded><![CDATA[<p>select备受鄙视，前端中会碰到各式各样的问题，例如：</p>
<p>1，弹出层无法阻挡select   <br />2，宽度，高度受系统影响，甚至连系统主题都影响select的宽高    <br />等等。</p>
<p>今天碰到这样一个问题，后台系统再做3级联动的时候，用jquery的append向select中推拼合好的option，在IE6/7下居然无法自适应宽度。找到的唯一理由是，低版本浏览器无法重绘界面，导致宽度无法自适应，使用的解决方案：</p>
<p>对select先隐藏，后再显示。例如：</p>
<p>$(&quot;#SelectID&quot;).hide().show();</p>
<p>另外一种可能的解决方案是:</p>
<p>使用原生js的options.add向select中添加。</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.smuwcwt.com/archives/673/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>再谈提问</title>
		<link>http://www.smuwcwt.com/archives/671</link>
		<comments>http://www.smuwcwt.com/archives/671#comments</comments>
		<pubDate>Wed, 29 Feb 2012 10:13:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[随便]]></category>

		<guid isPermaLink="false">http://www.smuwcwt.com/?p=671</guid>
		<description><![CDATA[多年前，看到过一篇叫《提问的艺术》，今天由于和同事纠结一个问题，又让我想起这篇文章。提出一个问题往往比解决一个问题更为重要。 现实VS期望 先来看看，我们通常收到的问题： 1. 不... </p>
No related posts.]]></description>
			<content:encoded><![CDATA[<p>多年前，看到过一篇叫《提问的艺术》，今天由于和同事纠结一个问题，又让我想起这篇文章。提出一个问题往往比解决一个问题更为重要。</p>
<p><strong>现实VS期望</strong></p>
<p>先来看看，我们通常收到的问题：</p>
<p>1. 不能留言了   <br />2. XX地方变形了</p>
<p>等等…</p>
<p>而我们的期望是这样的：</p>
<p>1. IE6下，留言框在留言的时候，点击提交按钮没有反应，页面没有任何变化。重新刷新页面后，新发的留言正常显示。</p>
<p>2. XX地方在html代码里正常显示，后台由于要控制是否显示，加上去一个ID，用来控制是否显示，但输出为display:block的时候，前台显示宽度不正常 。</p>
<p>就前端开发而言，提交的BUG我认为【至少】要包含以下几个方面：</p>
<p>【测试提交BUG】 浏览器版本，用户期望的效果，当前的效果。   <br />【代码嵌套提交BUG】期望效果，所做修改，原效果。</p>
<p>这样会更有助于快速定位错误，解决问题。</p>
<p><strong>三思而后问</strong></p>
<p>当你确认要提出问题的时候，请保证你能做到了以下几点：</p>
<p>1. 谨慎明确的描述问题；   <br />2. 提供问题发生的环境；    <br />3. 说明你在提问前是怎样去研究和理解这个问题的；    <br />4. 说明你在提问前采取了什么步骤去解决它；    <br />5. 罗列最近做过什么可能有影响的事件。</p>
<p><strong>反馈</strong></p>
<p>适当的时候，做出有效的反馈。例如，你提出了问题，有人给了你一种解决方案，你尝试了这种解决方案，或者找到了更好的解决方案，都需要及时的反馈给对方。</p>
<p>从前前老总那里学到的最最有用的东西，就是反馈。他说：不管我知不知道，你都要告诉我。</p>
<p><strong>链接</strong></p>
<p>推荐所有行业的朋友都去读读这篇文章。</p>
<p>http://www.awflasher.com/blog/archives/200   <br />http://wiki.woodpecker.org.cn/moin/AskForHelp</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.smuwcwt.com/archives/671/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TortoiseSVN备忘</title>
		<link>http://www.smuwcwt.com/archives/669</link>
		<comments>http://www.smuwcwt.com/archives/669#comments</comments>
		<pubDate>Tue, 21 Feb 2012 07:25:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端开发]]></category>

		<guid isPermaLink="false">http://www.smuwcwt.com/?p=669</guid>
		<description><![CDATA[1. svn中剔除文件或者文件类型 右键TortoiseSVN –&#62; 设置 –&#62; 常规设置 –&#62; Subversion 全局忽略样式(已经有很多默认模板了) 2. svn删除checkout历史记录 注册表中删除: cmd –&#62; regedit –&#62; HKEY... </p>
No related posts.]]></description>
			<content:encoded><![CDATA[<p>1. svn中剔除文件或者文件类型</p>
<p>右键TortoiseSVN –&gt; 设置 –&gt; 常规设置 –&gt; Subversion 全局忽略样式(已经有很多默认模板了)</p>
<p>2. svn删除checkout历史记录</p>
<p>注册表中删除: cmd –&gt; regedit –&gt; HKEY_CURRENT_USER\Software\TortoiseSVN\History\repoURLS 删除不需要的键值</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.smuwcwt.com/archives/669/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE6页面跳转的一个奇怪BUG</title>
		<link>http://www.smuwcwt.com/archives/662</link>
		<comments>http://www.smuwcwt.com/archives/662#comments</comments>
		<pubDate>Thu, 15 Dec 2011 05:51:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端开发]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[ie6]]></category>

		<guid isPermaLink="false">http://www.smuwcwt.com/?p=662</guid>
		<description><![CDATA[百度搞了一个分享平台，好吧，试用一下，发现分享成功，但各平台下跳转回来的地址存在IE6下参数获取错误的问题。 问题重现(新浪微博为例)： 分享平台获取的地址一般为http://www.domain.com/tes... </p>
No related posts.]]></description>
			<content:encoded><![CDATA[<p>百度搞了一个分享平台，好吧，试用一下，发现分享成功，但各平台下跳转回来的地址存在IE6下参数获取错误的问题。</p>
<p><strong>问题重现(新浪微博为例)：</strong></p>
<p>分享平台获取的地址一般为http://www.domain.com/test.asp?id=100#0-tsina-111111-111111-de70028302b856c997bc35861eb52ece，分享平台都有自己的短网址，一般为http://t.cn/AbCdEf，点击的时候做了一次跳转到分享平台获取的地址。但是由于添加了#号后面的内容，在IE6浏览器下Request得到的ID值严重不正确，居然包含#号后面的所有字符。</p>
<p><strong>问题简化：</strong></p>
<p>1.asp
<pre class="brush: html; ">
&lt;a href=&quot;2.asp&quot;&gt;测试&lt;/a&gt;
</pre>
</p>
<p>2.asp
<pre class="brush: vb; ">
Response.Redirect(&quot;3.asp?ID=14#efefef&quot;)
</pre>
</p>
<p>3.asp
<pre class="brush: vb; ">
Response.Write(Request(&quot;ID&quot;))
</pre>
</p>
<p>IE6下，单击1.asp里的链接 或 直接访问2.asp，输出的值为：14#efefef</p>
<p><strong>解决问题：</strong></p>
<p>1. 过滤掉#及后面的所有字符<br />2. 添加空的参数，例如3.asp?ID=14&amp;<font color="#ff0000">TP=</font>#efefef</p>
<p><strong>追究原由：</strong></p>
<p>测试了FF7,FF8,FF(8),Chrome(15),Safari(5.1)均未发现问题。查询网络发现 <a href="http://www.youguanbumen.net/53.html" target="_blank">这篇</a> 文章和我碰到了同样的问题，和几个同事讨论均认为有可能是IE6在跳转时发生的问题，该问题已经提交到微软在线论坛等待MVP反馈。如有描述错误之处，请指教。</p>
<p><strong>PS:</strong></p>
<p>12.16 MVP回复可能为IE6的某BUG，并提供同样问题的链接 <a href="http://www.ianhoar.com/2008/11/16/internet-explorer-6-and-redirected-anchor-links/" target="_blank">Internet Explorer 6 and redirected anchor links</a>。</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.smuwcwt.com/archives/662/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>纪念曾今的新闻组</title>
		<link>http://www.smuwcwt.com/archives/655</link>
		<comments>http://www.smuwcwt.com/archives/655#comments</comments>
		<pubDate>Wed, 14 Dec 2011 18:45:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[随便]]></category>
		<category><![CDATA[新闻组]]></category>

		<guid isPermaLink="false">http://www.smuwcwt.com/?p=655</guid>
		<description><![CDATA[当我还是个MS粉的时候，碰到问题，第一个想到的就是去微软新闻组去问，原因很简单，当时搜索引擎不给力，社区没有现在发达，没有或我不知道CSDN，以及众多的MVP。 今天碰到一个非常奇怪... </p>
No related posts.]]></description>
			<content:encoded><![CDATA[<p>当我还是个MS粉的时候，碰到问题，第一个想到的就是去微软新闻组去问，原因很简单，当时搜索引擎不给力，社区没有现在发达，没有或我不知道CSDN，以及众多的MVP。</p>
<p>今天碰到一个非常奇怪的问题，才想起了当年的新闻组，只是登录未遂，查找得知微软从2010年中旬开始陆续关闭提供服务8年之久的新闻组了。</p>
<p>回想当年的楞头小子，如今已为人夫已为人父，感慨良多啊。</p>
<p>再见了新闻组，再见了OUTLOOK。</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.smuwcwt.com/archives/655/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>google reader里的共享条目</title>
		<link>http://www.smuwcwt.com/archives/653</link>
		<comments>http://www.smuwcwt.com/archives/653#comments</comments>
		<pubDate>Wed, 14 Dec 2011 15:31:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[随便]]></category>
		<category><![CDATA[googlereader]]></category>
		<category><![CDATA[gr]]></category>

		<guid isPermaLink="false">http://www.smuwcwt.com/?p=653</guid>
		<description><![CDATA[做为一个清新主义者，绝对不能让一切不和谐的东西出现。google reader最新的这个小清新版本，看起来挺简洁，其实很蛋疼。例如强行删除了共享条目等等。 无意中浏览到数据汇总里，居然有一... </p>
Related posts:<ol>
<li><a href='http://www.smuwcwt.com/archives/294' rel='bookmark' title='Google PR的疑问'>Google PR的疑问</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>做为一个清新主义者，绝对不能让一切不和谐的东西出现。google reader最新的这个小清新版本，看起来挺简洁，其实很蛋疼。例如强行删除了共享条目等等。</p>
<p>无意中浏览到数据汇总里，居然有一条被误点的共享条目，随即翻遍了GR所有的功能，根本无法删除，只能求助搜索引擎。如果碰到同样问题的朋友，可以按下面的方法删除不想在共享的条目。</p>
<p>1. <a href="https://chrome.google.com/webstore/detail/gmgmcmhmodidojodfoekpbjnejlhcbpb?hl=en-US" target="_blank">Chrome扩展版本</a>&nbsp; <br />2. 浏览你的GR，看看熟悉的 共享条目 是否已经出现</p>
<p><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="" src="http://www.smuwcwt.com/wp-content/uploads/2011/12/gr-share.jpg" width="504" height="339"/></p>
<p>Related posts:<ol>
<li><a href='http://www.smuwcwt.com/archives/294' rel='bookmark' title='Google PR的疑问'>Google PR的疑问</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.smuwcwt.com/archives/653/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>好图一张</title>
		<link>http://www.smuwcwt.com/archives/651</link>
		<comments>http://www.smuwcwt.com/archives/651#comments</comments>
		<pubDate>Sat, 19 Nov 2011 02:53:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[随便]]></category>

		<guid isPermaLink="false">http://www.smuwcwt.com/archives/651</guid>
		<description><![CDATA[迫于无奈，帮亲戚做了网站，还免费送域名空间，然后，然后得到的结果是，还缺少点东西。其实我想说，如图： (图为转载) 其实很早以前，我就决定三不做了： 1. 太大不做 2. 太小不做 3. 太... </p>
No related posts.]]></description>
			<content:encoded><![CDATA[<p>迫于无奈，帮亲戚做了网站，还免费送域名空间，然后，然后得到的结果是，还缺少点东西。其实我想说，如图：</p>
<p><img style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" border="0" alt="dtc" src="http://www.smuwcwt.com/wp-content/uploads/2011/11/dtc.jpg" width="321" height="395" /> (图为转载)</p>
<p>其实很早以前，我就决定三不做了：</p>
<p>1. 太大不做   <br />2. 太小不做    <br />3. 太麻烦不做</p>
<p>现在我决定，亲戚朋友的不做。</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.smuwcwt.com/archives/651/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

