Skip to content
Browse files

显示关键词

  • Loading branch information...
1 parent 29f13c4 commit cc3600b8bb7f070c06edf13ca0d41ac94c29e17c @jondynet committed Dec 4, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 cgi-bin/index.py
View
8 cgi-bin/index.py
@@ -43,14 +43,14 @@
<div class="c">
<form action="" method="get">
<div>
- <input type="text" name="keywords" maxlength="64" size="20" />
+ <input type="text" name="keywords" maxlength="64" value="%(keywords)s" />
<br/>
<input type="submit" value="关键词搜索" />
</div>
</form>
</div>
<div class="a">
- %s
+ %(content)s
<br/>
</div>
</div>
@@ -84,8 +84,8 @@
end = time.clock()
rs.append(u'<ul>执行时间 %s 秒</ul>' % str(end-start))
rs_html = u''.join(rs)
- print html % rs_html.encode('utf-8')
+ print html % {'content':rs_html.encode('utf-8'), 'keywords':keywords}
else:
- print html % ''
+ print html % {'keywords':'', 'content':''}

0 comments on commit cc3600b

Please sign in to comment.
Something went wrong with that request. Please try again.