Satellite: saving Home
[phoenix.git] / pages / 编码.textile
blob9053652b814aa859e74b2f16c798fd262ec6027b
1 h2. 页面参数编码问题
3 gb2312页面代码
5 {{{(html)
6 <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
7 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="gb2312">
8 <head>
9         <title id="vi_fdev_title">阿里学院—网商学习平台和知识社区</title>
10         <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
11         <meta name="description" id="vi_fdev_cdes" content="阿里学院是网商学习平台和知识社区,为未来网商的教育机构和在线交流学习平台" />
12         <meta name="keywords" id="vi_fdev_keys" content="阿里学院,电子商务,知识社区,企业过冬,在线课程
13 " />
14         <link rel="stylesheet" rev="stylesheet" href="http://style.china.alibaba.com/css/common/viframe/fdev_main.css" type="text/css" media="all" />
15         <link rel="stylesheet" id="vi_fdev_style" rev="stylesheet" href="http://style.china.alibaba.com/css/common/viframe/vi_style13.css" type="text/css" media="all" />
16         <base target="_blank" />
18 </head>
19 <body>
20         <form action="http://localhost:3000/order/create" onsubmit="this.key.value=encodeURIComponent(this.key.value)" method="post">
21                 <input type="text" value="" name="key"/>
22         </form>
23 </body>
24 </html>
25 }}}
27 cotroller
29 {{{(ruby)
30 require 'cgi'
31 render :text => "#{CGI.unescape(params[:key])}" and return
32 }}}