-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path通过修改键盘映射替代损坏按键.html
executable file
·423 lines (351 loc) · 31 KB
/
通过修改键盘映射替代损坏按键.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>[ZZ]通过修改键盘映射替代损坏按键 - Jackiesteed - 博客园</title>
<link type="text/css" rel="stylesheet" href="http://common.cnblogs.com/css/blog/common.css?id=2012041202"/>
<link id="MainCss" type="text/css" rel="stylesheet" href="http://common.cnblogs.com/Skins/BlackSun/style.css?id=2012041202"/>
<link type="text/css" rel="stylesheet" href="http://common.cnblogs.com/css/blog/common2.css"/>
<link type="text/css" rel="stylesheet" href="http://common.cnblogs.com/css/shStyle.css"/>
<link title="RSS" type="application/rss+xml" rel="alternate" href="http://www.cnblogs.com/jackiesteed/rss"/>
<link title="RSD" type="application/rsd+xml" rel="EditURI" href="http://www.cnblogs.com/jackiesteed/rsd.xml"/>
<link type="application/wlwmanifest+xml" rel="wlwmanifest" href="http://www.cnblogs.com/jackiesteed/wlwmanifest.xml"/>
<script src="http://common.cnblogs.com/script/jquery.js" type="text/javascript"></script>
<script src="http://common.cnblogs.com/script/blog/common.js?id=2012041202" type="text/javascript"></script>
<script src="http://common.cnblogs.com/script/json2.js" type="text/javascript"></script>
<script type="text/javascript" src="http://common.cnblogs.com/script/syntaxHighlighter.js"></script>
</head>
<body>
<a name="top"></a>
<form method="post" action="2201948.html" id="Form1">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="" />
</div>
<script type="text/javascript">
//<![CDATA[
var currentBlogApp='jackiesteed';
//]]>
</script>
<div id="top">
<div>
<table class="HeaderTitles">
<tr>
<td>
<h1 class="HeaderTitle"><a id="Header1_HeaderTitle" class="HeaderMainTitle" href="http://www.cnblogs.com/jackiesteed/">Jackiesteed</a></h1>
<p id="tagline">Jackiesteed is short for "Jackie is a steed."</p>
</td>
</tr>
</table>
</div>
<div>
<table id="HeaderBar" class="HeaderBar">
<tr>
<td class="HeaderBarTab" nowrap>
<a id="Header1_MyLinks1_HomeLink" href="http://www.cnblogs.com/">博客园</a> ::
<a id="Header1_MyLinks1_MyHomeLink" href="http://www.cnblogs.com/jackiesteed/">首页</a> ::
<a id="Header1_MyLinks1_ContactLink" accesskey="9" rel="nofollow" href="http://space.cnblogs.com/msg/send/Jackiesteed">联系</a> ::
<a id="Header1_MyLinks1_Syndication" href="http://www.cnblogs.com/jackiesteed/rss">订阅</a>
<a id="Header1_MyLinks1_XMLLink" class="XMLLink" href="http://www.cnblogs.com/jackiesteed/rss"><img src="http://www.cnblogs.com/images/xml.gif" alt="订阅" /></a> ::
<a id="Header1_MyLinks1_Admin" rel="nofollow" href="http://www.cnblogs.com/jackiesteed/admin/EditPosts.aspx">管理</a>
</td>
<td class="HeaderBarTabBack" nowrap width="100%">
<table class="BlogStatsBar">
<tr>
<td width="100%">
</td>
<td class="BlogStatsBar" nowrap>
0
Posts ::
49 Stories
::
9 Comments
::
0 Trackbacks
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
<table id="maintable">
<tr><td id="leftmenu">
<h3>公告</h3>
<div class="News">
<div id="profile_block">昵称:<a href="http://home.cnblogs.com/u/jackiesteed/">Jackiesteed</a><br/>园龄:<a href="http://home.cnblogs.com/u/jackiesteed/" title="入园时间:2011-04-06">1年</a><br/>粉丝:<a href="http://home.cnblogs.com/u/jackiesteed/followers/">5</a><br/>关注:<a href="http://home.cnblogs.com/u/jackiesteed/followees/">12</a><div id="p_b_follow"></div><script type="text/javascript">cnblogs.UserManager.GetFollowStatus('41752ab9-6160-e011-a53f-842b2b196315')</script></div>
</div>
<script type="text/javascript">
var blogapp = 'jackiesteed';
</script>
<div class="mySearch">
<h3 class="catListTitle">搜索</h3>
<div id="widget_my_zzk" class="div_my_zzk"><input type="text" id="q" onkeydown="return zzk_go_enter(event);" class="input_my_zzk"/> <input onclick="zzk_go()" type="button" value="找找看" id="btnZzk" class="btn_my_zzk"/></div>
<div id="SingleColumn1_ctl00_widget_my_google" class="div_my_zzk"><input type="text" name="google_q" id="google_q" onkeydown="return google_go_enter(event)" class="input_my_zzk"/> <input onclick="google_go()" type="button" value="谷歌搜索" class="btn_my_zzk"/></div>
</div>
<h3 class="catListTitle">我的标签</h3>
<div id="MyTag">
<ul>
<li><a href="http://www.cnblogs.com/jackiesteed/tag/%E6%95%B0%E8%AE%BA/">数论</a>(5)</li><li><a href="http://www.cnblogs.com/jackiesteed/tag/Codeforces/">Codeforces</a>(3)</li><li><a href="http://www.cnblogs.com/jackiesteed/tag/POJ/">POJ</a>(3)</li><li><a href="http://www.cnblogs.com/jackiesteed/tag/Lyric/">Lyric</a>(2)</li><li><a href="http://www.cnblogs.com/jackiesteed/tag/GCJ/">GCJ</a>(2)</li><li><a href="http://www.cnblogs.com/jackiesteed/tag/ACM/">ACM</a>(2)</li><li><a href="http://www.cnblogs.com/jackiesteed/tag/%E4%BA%8C%E5%88%86/">二分</a>(2)</li><li><a href="http://www.cnblogs.com/jackiesteed/tag/%E6%95%B0%E5%AD%A6/">数学</a>(2)</li><li><a href="http://www.cnblogs.com/jackiesteed/tag/%E7%BA%BF%E6%AE%B5%E6%A0%91/">线段树</a>(2)</li><li><a href="http://www.cnblogs.com/jackiesteed/tag/Python/">Python</a>(2)</li><li><a href="http://www.cnblogs.com/jackiesteed/tag/">更多</a></li>
</ul>
</div>
<div class="mainMenuBackground">
<h3>文章分类<span style="font-size:11px;font-weight:normal">(47)</span></h3>
<ul>
<li class="menuItemList">
<a id="SingleColumn1_Categories_CatList_LinkList_0_Link_0" href="http://www.cnblogs.com/jackiesteed/category/292551.html">ACM(40)</a>
<span style="width:10px">
<a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_0" href="#" onclick="return open_link('http://feed.cnblogs.com/blog/u/86870/category/292551/rss');"><img src="/Skins/BlackSun/Images/xmlsmall.gif" alt="rss" /></a>
</span>
</li>
<li class="menuItemList">
<a id="SingleColumn1_Categories_CatList_LinkList_0_Link_1" href="http://www.cnblogs.com/jackiesteed/category/303355.html">Life(7)</a>
<span style="width:10px">
<a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_1" href="#" onclick="return open_link('http://feed.cnblogs.com/blog/u/86870/category/303355/rss');"><img src="/Skins/BlackSun/Images/xmlsmall.gif" alt="rss" /></a>
</span>
</li>
</ul>
</div>
<H3>积分与排名</H3>
<ul>
<li>
积分 -
3155
<li>
排名 -
17427
</li>
</ul>
<h3 class="catListTitle">最新评论</h3>
<div class="RecentComment" id="RecentComments">
<div id="RecentCommentsBlock"></div>
</div>
</td><td id="main">
<div class="post">
<div class="postTitle">
<a id="cb_post_title_url" href="http://www.cnblogs.com/jackiesteed/articles/2201948.html">[ZZ]通过修改键盘映射替代损坏按键</a>
</div>
<div class="postText">
<div id="cnblogs_post_body"><p><span style="color: #666666; font-family: Arial; font-size: 12px;">我买的神舟笔记本电脑因为使用不当,致使Ctrl键与PageUp键损坏。而该电脑仅有键盘左下角一个Ctrl键,损坏之后给日常使用带来许多不便。由于 我装的是Windows 2000 + Debian Linux双系统,而登录Windows被我先前设置为需要按下Ctrl+Alt+Del才能出现登录窗口,Ctrl键的损坏使得我暂时不能进入 Windows,因此在我购买外置USB键盘之前,我都是在Linux下工作,并最终通过修改键盘映射,将不常用的按键映射到Ctrl和PageUp上, 解决了按键损坏带来的问题。而后,我也找到了Windows下修改键盘映射的方法。现将诸方法与网友共分享,以供参考。</span><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><strong style="color: #666666; font-family: Arial; font-size: 12px;"><span style="text-decoration: underline;">一、Linux下的键盘映射修改方法</span></strong><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><strong style="color: #666666; font-family: Arial; font-size: 12px;">1、使用GNOME中的键盘首选项解决Ctrl键损坏的问题</strong><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">在GNOME下可以方便地修改键盘的布局选项,这其中就有Ctrl键的位置设置。我最初就是用这个方法在GNOME下解决Ctrl键损坏的问题的。由于CapsLock键不常用,因为就用它来代替坏掉的Ctrl键。</span><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">方法:选择 系统->首选项->键盘,弹出键盘首选项设置对话框。在“布局选项”选项卡中,设置“Ctrl key position”为“Swap Ctrl and CapsLock”。这样Ctrl键就与CapsLock键交换,就可以用CapLock键来代替坏掉的Ctrl键了。当然,你也可以选择“Make CapsLock an additional Ctrl”。</span><br style="color: #666666; font-family: Arial; font-size: 12px;" /><strong style="color: #666666; font-family: Arial; font-size: 12px;">2、使用loadkeys改变tty终端下的键盘映射</strong><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">虽然在GNOME下解决了Ctrl键的使用问题,可是切换到终端下,Ctrl与CapsLock又恢复了原来的行为。这时我们可以通过loadkeys来改变终端下的键盘映射。</span><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">通过查询manpage可知,系统提供的键盘布局文件是放在/usr/share/keymaps目录下的。找到其中的 defkeymap.kmap.gz文件(在/usr/share/keymaps/i386/qwerty目录下),复制到用户的HOME目录中,解压 并打开它。我们要做的就是把Ctrl键映射到CapsLock键上。找到其中包含Caps_Lock的那一行:</span><span style="font-family: Arial; font-size: 12px; color: blue;">keycode 58 = Caps_Lock</span><span style="color: #666666; font-family: Arial; font-size: 12px;">,那就是CapsLock键对应的扫描码了。将它改成:</span><span style="font-family: Arial; font-size: 12px; color: blue;">keycode 58 = Control</span><span style="color: #666666; font-family: Arial; font-size: 12px;">即可。如果想将Ctrl与CapsLock键交换,可以找到含有Control字样的keycode定义:</span><span style="font-family: Arial; font-size: 12px; color: blue;">keycode 29 = Control</span><span style="color: #666666; font-family: Arial; font-size: 12px;">,</span><span style="font-family: Arial; font-size: 12px; color: blue;">keycode 97 = Control</span><span style="color: #666666; font-family: Arial; font-size: 12px;">,它们分别对应左、右Ctrl键(当然在我机器上只有左边的扫描码为29的Ctrl)。将其改为:</span><span style="font-family: Arial; font-size: 12px; color: blue;">keycode 29 = Caps_Lock</span><span style="color: #666666; font-family: Arial; font-size: 12px;">即可。</span><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">在终端下,Shift+PageUp/PageDown是常用的屏幕向上/下翻页的快捷键。而PageUp键的损坏影响了这一功能的使用。我通过将 PageUp映射到不常用的“鼠标右键菜单”键上,解决了终端下的翻页问题。方法是:运行showkey命令,这时可以通过按下键盘上的按键,程序会显示 该键按下与释放所对应的扫描码。由此法可得到鼠标右键菜单键对应的扫描码为0x7f,即127。又在另一台机器上找到PageUp对应的扫描码为104。 在defkeymap.kmap文件中找到keycode 104对应的那两行:</span></p>
<h6 class="quote" style="color: #666666; font-family: Arial;"><a href="http://hi.baidu.com/kxw102/blog/item/:" style="color: #99d100;">Copy code</a></h6>
<blockquote style="color: #666666; font-family: Arial; font-size: 12px;">keycode 104 = Prior<br />shift keycode 104 = Scroll_Backward</blockquote>
<p><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">把扫描码127的那一行改成:</span></p>
<h6 class="quote" style="color: #666666; font-family: Arial;"><a href="http://hi.baidu.com/kxw102/blog/item/:" style="color: #99d100;">Copy code</a></h6>
<blockquote style="color: #666666; font-family: Arial; font-size: 12px;">keycode 127 = Prior<br />shift keycode 127 = Scroll_Backward</blockquote>
<p><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">即可。</span><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">现在我们已经有了修改过后的defkeymap.kmap文件。要在终端中使用这个键盘映射,我们只需要执行loadkeys defkeymap.kmap即可。可是这样每次进入终端都要执行这个命令,十分不爽,而我们又不应该将其加入.bashrc中,否则运行gnome- terminal时也会执行loadkeys命令,而虚拟终端下执行loadkeys会产生错误。这时,我们可以将在/etc目录下找到的kmap文件 ——/etc/console/boottime.kmap.gz按如上的方法修改,并将修改过后的文件用gzip压缩后替换原来的文件。这样,系统启动 后就会加载这个文件,使得每个终端睛的键盘映射都得到了改变。</span><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><strong style="color: #666666; font-family: Arial; font-size: 12px;">3、使用setxkbmap在GNOME下将PageUp映射到鼠标右键菜单键上</strong><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">虽然前面讲了在GNOME将Ctrl键映射到CapsLock键上的方法,但是还没有解决将PageUp键映射到鼠标右键菜单键上的问题。桌面环境自带的键盘首选项里没有相关的选项。经过在网上的寻找及自己的研究,我终于解决了这个问题:使用setxkbmap。</span><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">百度上能找到的修改X下的键盘映射的文章几乎都是讲使用xmodmap,执行xmodmap -pke > ~/.xmodmaprc后修改.xmodmaprc文件以达到修改的目的。但我试验后发现不成功。后来在国外的网站上看到说现在的桌面环境,如 GNOME、KDE等已经不再使用xmodmap了,而采用XKB进行键盘管理。通过setxkbmap可以较为方便地达到设定的目的。</span><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">例如,执行setxkbmap -option ctrl:swapcaps就可以将Ctrl键与CapsLock键进行切换。setxkbmap -print就可以显示当前键盘的布局及选项设置。执行setxkbmap -option就可以恢复到默认选项。</span><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">通过查看manpage得知,XKB的所有组件的源文件都在/usr/lib/X11/xkb目录下。而我的机器找到的是在/usr/share/X11 /xkb目录下。通过grep -R swapcaps *找到目录下所有包含swapcaps字样的文件,由此可知,swapcaps是在symbos/ctrl文件里定义的。打开该文件,可以见到 swapcaps是如此定义的:</span></p>
<h6 class="quote" style="color: #666666; font-family: Arial;"><a href="http://hi.baidu.com/kxw102/blog/item/:" style="color: #99d100;">Copy code</a></h6>
<blockquote style="color: #666666; font-family: Arial; font-size: 12px;">partial modifier_keys <br />xkb_symbols "swapcaps" {<br />key <CAPS> { symbols[Group1]= [ Control_L ] };<br />key <LCTL> { symbols[Group1]= [ Caps_Lock ] };<br />};</blockquote>
<p><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">以管理员身份编辑该文件,将这一部分复制一份,并修改为:</span></p>
<h6 class="quote" style="color: #666666; font-family: Arial;"><a href="http://hi.baidu.com/kxw102/blog/item/:" style="color: #99d100;">Copy code</a></h6>
<blockquote style="color: #666666; font-family: Arial; font-size: 12px;">partial modifier_keys <br />xkb_symbols "swapmenu" {<br />key <MENU> { symbols[Group1]= [ Prior ] };<br />key <PGUP> { symbols[Group1]= [ Menu ] };<br />};</blockquote>
<p><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">其中MENU即是“鼠标右键菜单键”,它的定义是在symbols/pc文件里找到的。</span><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">修改保存后,仍然不能使用setxkbmap -option ctrl:swapmenu。这时我们需要将先前用grep搜索到的文件里包含swapcaps的那一段统统复制一份,并将swapcaps改为 swapmenu。需要修改的文件有:symbols.dir、rules/base、rules/base.lst与rules/base.xml。这 样,我们就可以通过setxkbmap -option ctrl:swapmenu来将PageUp键与鼠标右键菜单键交换。此后鼠标右键菜单键就可以被当作PageUp键使用了。</span><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><strong style="color: #666666; font-family: Arial; font-size: 12px;"><span style="text-decoration: underline;">二、Windows下的键盘映射修改方法</span></strong><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">后来我买了个USB键盘(我懒得花钱去修键盘),总算进了Windows。我就想,Windows下也应该有修改键盘映射的方法吧。于是,我在网上好不容易找到了修改键盘映射的软件——sharpkeys。</span><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">Sharpkeys可以从</span><a target="_blank" href="http://www.randyrants.com/" style="color: #99d100; font-family: Arial; font-size: 12px;">http://www.randyrants.com</a><span style="color: #666666; font-family: Arial; font-size: 12px;">下载并免费使用。我使用的是它的1.1版本。它通过修改Windows 2000/XP/2003的注册表里的特殊项来达到键盘映射的目的。下面我就来给大家演示一下如何使用。</span><br style="color: #666666; font-family: Arial; font-size: 12px;" /><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">以管理员身份运行sharpkeys。点击“Add”按钮,即可弹出如图所示的对话框。左边即是原来的按键,右边则为将要映射到的按键。例如将 CapsLock键映射为Ctrl键,则在左边选择Caps Lock,右边选择Left Ctrl即可。另外,点击“Type Key”即可弹出一对话框,接收用户的按键,并自动选择对应的列表中的选项。例如要将鼠标右键菜单键映射为PageUp键,则可点击“Type Key”按钮,按下鼠标右键菜单键,并点击OK,再在右边选择Page Up即可。</span><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">完成设置之后,在主窗口中点击“Write to Registry”即可将改动写入注册表。注销后即可生效。怎么样?现在按CapsLock+Alt+Del键就可以调出登录对话框了。</span><br style="color: #666666; font-family: Arial; font-size: 12px;" /><span style="color: #666666; font-family: Arial; font-size: 12px;">(完)</span></p>
<p></p></div>
<script type="text/javascript">
if ($ != jQuery) {
$ = jQuery.noConflict();
}
var isLogined = false;
var cb_blogId = 86870;
var cb_entryId = 2201948;
var cb_blogApp = "jackiesteed";
var cb_blogUserGuid = "41752ab9-6160-e011-a53f-842b2b196315";
var cb_entryCreatedDate = '2011/10/8 12:19:00';
</script>
<div id="blog_post_info_block">
<div id="BlogPostCategory"></div>
<div id="EntryTag"></div>
<div id="green_channel" style="display:none;">
绿色通道:<a href="javascript:void(0);" id="green_channel_digg" onclick="DiggIt(cb_entryId,cb_blogId,1);green_channel_success(this,'谢谢推荐!');">好文要顶</a><a id="green_channel_follow" onclick="c_follow();" href="javascript:void(0);">关注我</a><a id="green_channel_favorite" onclick="AddToWz(2201948);return false;" href="javascript:void(0);" >收藏该文</a><a id="green_channel_contact" href="http://space.cnblogs.com/msg/send/Jackiesteed" target="_blank">与我联系</a>
<a id="green_channel_weibo" href="javascript:void(0);" title="分享至新浪微博" onclick="ShareToTsina()"><img src="http://static.cnblogs.com/images/icon_sina.gif" alt="" /></a>
</div>
<div id="digg_block">
<div id="author_profile">
<div id="author_profile_info" class="author_profile_info">
<div id="author_profile_detail" class="author_profile_info">
</div>
</div>
<div class="clear"></div>
<div id="author_profile_honor"></div>
<div id="author_profile_follow"></div>
</div>
<div id="div_digg" style="display:none;">
<div class="diggit" onclick="DiggIt(cb_entryId,cb_blogId,1)">
<span class="diggnum" id="digg_count"></span>
</div>
<div class="buryit" onclick="DiggIt(cb_entryId,cb_blogId,2)">
<span class="burynum" id="bury_count"></span>
</div>
<div class="clear"></div>
<div class="diggword" id="digg_tips"></div>
</div>
</div>
<div class="clear"></div>
<div id="post_next_prev">
</div>
</div>
<script type="text/javascript">
LoadPostInfoBlock(cb_blogId, cb_entryId, cb_blogApp, cb_blogUserGuid);
GetPrevNextPost(cb_entryId, cb_blogId, cb_entryCreatedDate);
</script>
</div>
<div class="postfoot">
posted on 2011-10-08 12:19 <a href='http://www.cnblogs.com/jackiesteed/'>Jackiesteed</a> 阅读(412) <a href='#commentform'>评论(0)</a> <a href="http://www.cnblogs.com/jackiesteed/admin/EditArticles.aspx?postid=2201948" rel="nofollow">编辑</a> <a href="#" onclick="AddToWz(2201948);return false;">收藏</a>
</div>
</div>
<img src ="http://www.cnblogs.com/jackiesteed/aggbug/2201948.html?type=2&webview=1" width="1px" height="1px" alt=""/>
<div id="comment_form" class="commentform">
<div id="divCommentShow"></div>
<div id="comment_nav"><span id="span_refresh_tips"></span><a href="#" onclick="return RefreshCommentList(cb_entryId);" name="commentform" id="lnk_RefreshComments">刷新评论列表</a><a href="#" onclick="return RefreshPage();">刷新页面</a><a href="#top">返回顶部</a></div>
<div id="comment_form_container"></div>
<script type="text/javascript">
commentManager.loadCommentForm();
</script>
<div class="ad_text_commentbox"><a href="http://q.cnblogs.com/" target="_blank">程序员问答社区,解决您的IT难题</a></div>
<div id="clear_read_link"></div>
<script type="text/javascript">
$("#clear_read_link").html('<a href="http://archive.cnblogs.com/a/' + cb_entryId + '/" target="_blank" rel="nofollow">简洁阅读版式</a>')
</script>
<div id="site_nav_under">
<a href="http://www.cnblogs.com/" target="_blank" title="程序员的网上家园">网站首页</a><a href="http://q.cnblogs.com/" target="_blank" title="程序员问答社区">博问</a><a href="http://news.cnblogs.com/" target="_blank" title="IT新闻">新闻</a><a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a><a href="http://job.cnblogs.com/" target="_blank">程序员招聘</a><a href="http://kb.cnblogs.com/" target="_blank">知识库</a>
<div id="site_editor_opt"></div>
<script type="text/javascript">
if (isLogined) {
showEditorOpt();
}
</script>
</div>
<script type="text/javascript">
var enableGoogleAd = true;
if ($("#cnblogs_post_body").text().length < 500) {
enableGoogleAd = false;
}
</script>
<script type='text/javascript'>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
(function () {
if (enableGoogleAd) {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
gads.src = 'http://common.cnblogs.com/script/gpt.js';
var node = document.getElementsByTagName('script')[0];
node.parentNode.insertBefore(gads, node);
}
})();
</script>
<script type='text/javascript'>
if (enableGoogleAd) {
try {
googletag.cmd.push(function () {
googletag.defineSlot('/1090369/cnblogs_blogpost_C1', [300, 250], 'div-gpt-ad-1320933818841-0').addService(googletag.pubads());
googletag.defineSlot('/1090369/cnblogs_blogpost_C2', [468, 60], 'div-gpt-ad-1320933818841-1').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
} catch (e) { }
}
</script>
<div id="google_ad_c1" class="c_ad_block">
<!-- cnblogs_blogpost_C1 -->
<div id='div-gpt-ad-1320933818841-0' style='width:300px; height:250px;'>
<script type='text/javascript'>
if (enableGoogleAd) {
try {
googletag.cmd.push(function () { googletag.display('div-gpt-ad-1320933818841-0'); });
} catch (e) { }
}
</script>
</div>
</div>
<div class="itnews c_ad_block">
<b>最新IT新闻</b>:<br />
· <a href="http://news.cnblogs.com/n/138698/" target="_blank">早期融资九误区:认钱不认人 创始人股权太散</a><br />
· <a href="http://news.cnblogs.com/n/138697/" target="_blank">LiveAction:记者们会心动的拍摄套装</a><br />
· <a href="http://news.cnblogs.com/n/138695/" target="_blank">英特尔计划为Ultrabook电池制定标准</a><br />
· <a href="http://news.cnblogs.com/n/138694/" target="_blank">虚幻引擎太强大 美国利用其培训特工及技术人员</a><br />
· <a href="http://news.cnblogs.com/n/138693/" target="_blank">分析称谷歌营收仍靠搜索 移动战略还有待证明</a><br />
» <a href="http://news.cnblogs.com/" title="IT新闻" target="_blank">更多新闻...</a>
</div>
<div class="itnews c_ad_block" id="kb_block">
<b>最新知识库文章</b>:<br />
<div id="kb_recent">
· <a href="http://kb.cnblogs.com/page/138573/" target="_blank">使用Phalanger整合PHP和.Net</a><br />
· <a href="http://kb.cnblogs.com/page/134052/" target="_blank">程序员编程生产力相差10倍意味着什么?</a><br />
· <a href="http://kb.cnblogs.com/page/138127/" target="_blank">敏捷开发:如何通过回顾保持学习状态</a><br />
· <a href="http://kb.cnblogs.com/page/138095/" target="_blank">程序员真的很懒</a><br />
· <a href="http://kb.cnblogs.com/page/138361/" target="_blank">最常被程序员们谎称读过的计算机书籍</a><br />
</div>
» <a href="http://kb.cnblogs.com/" target="_blank">更多知识库文章...</a>
</div>
<div id="google_ad_c2" class="c_ad_block">
<!-- cnblogs_blogpost_C2 -->
<div id='div-gpt-ad-1320933818841-1' style='width:468px; height:60px;'>
<script type='text/javascript'>
if (enableGoogleAd) {
try {
googletag.cmd.push(function () { googletag.display('div-gpt-ad-1320933818841-1'); });
} catch (e) { }
}
</script>
</div>
</div>
<div id="ad_under_comment2" class="c_ad_block" style="display:none;">
<a href="http://www.china-pub.com/STATIC07/1107/2011chinapub_6810_110718/2011chinapub_6810_110718.asp" target="_blank" rel="nofollow"><img src="http://static.cnblogs.com/images/a4/china-pub.jpg" alt="" style="border:0px;"/></a><br />
<a href="http://www.china-pub.com/STATIC07/1107/zh_autumntb_110725/zh_autumntb_110725.asp" target="_blank" rel="nofollow">China-pub 2011秋季教材巡展</a><br />
<a href="http://www.china-pub.com/static07/0901/zh_jueba_090121.asp" target="_blank" rel="nofollow">China-Pub 计算机绝版图书按需印刷服务</a><br />
</div>
<script type="text/javascript">
if (enableGoogleAd) {
if (document.getElementById("ad_under_comment2")) {
$("#ad_under_comment2").show();
}
}
else {
$("#google_ad_c1").hide();
$("#google_ad_c2").hide();
}
</script>
<div id="HistoryToday" class="c_ad_block">
</div>
<script type="text/javascript">
$(document).ready(function () {
GetHistoryToday(cb_blogId, cb_blogApp, cb_entryCreatedDate);
});
</script>
</div>
</tr>
</table>
<p id="footer">
Copyright @
Jackiesteed<BR>
Powered by:
<a href="http://scottwater.com/blog" target=_blank>.Text</a> and
<a href="http://asp.net" target=_blank>ASP.NET</a>
<br>
Theme by: <a href="http://www.DotNetMonster.com" target=_blank>.NET Monster</a>
</p>
</form>
<script type="text/javascript">
if (!isSyntaxHighlighted) {
try {
SyntaxHighlighter.all();
} catch (e) { }
}
</script>
<script type="text/javascript" src="http://common.cnblogs.com/script/ShowHidden.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-476124-1']);
_gaq.push(['_setDomainName', 'cnblogs.com']);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>