有如下html代码,采用utf8编码
<META http-equiv="Content-Type" content="text/html;charset=utf8">
<meta http-equiv="PRAGMA" content="NO-CACHE">
<FORM name="form1" id="form1" action="http://localhost/temp1.aspx" method="get">
<input type=text name=KeyType>
<input type=text name=SearchKey>
<input type=submit>
</form>
<div style="font-family:宋体">字体大小都不一样</div>
现将这些代码分别保存为temp.htm和temp.aspx,然后在浏览器中分别显示这2个页面。
然后出现以下问题:1.返回的字体大小不一样
2.在输入框中输入中文以后提交表单,结果在浏览器中的地址栏显示出来的querystring也不同我知道是编码的问题,但不知道为什么,能否是htm文件提交的querystring和aspx文件提交的querystring一样呢请高手解答,谢谢
<META http-equiv="Content-Type" content="text/html;charset=utf8">
<meta http-equiv="PRAGMA" content="NO-CACHE">
<FORM name="form1" id="form1" action="http://localhost/temp1.aspx" method="get">
<input type=text name=KeyType>
<input type=text name=SearchKey>
<input type=submit>
</form>
<div style="font-family:宋体">字体大小都不一样</div>
现将这些代码分别保存为temp.htm和temp.aspx,然后在浏览器中分别显示这2个页面。
然后出现以下问题:1.返回的字体大小不一样
2.在输入框中输入中文以后提交表单,结果在浏览器中的地址栏显示出来的querystring也不同我知道是编码的问题,但不知道为什么,能否是htm文件提交的querystring和aspx文件提交的querystring一样呢请高手解答,谢谢
<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"
/>文件用记事本打开->另存为->编码选utf-8
还有个问题,系统默认的编码方式是不是utf-8,因为我的虚拟目录没有配置web.config,但是返回的结果却是utf-8