一个很普通的ASPX页面.
//本页查询,使用js查询
function search()
{
txt = document.getElementById("txtSearch").value;
window.location = "search.aspx?q="+txt;
}后台直接是.cs
txtSearch.Text = this.Request.QueryString.Get("q");当输入查询条件"用户"时.可以正常返回,txtSearch.Text = "用户";
而,当输入查询条件"用户名"时,出现错误,txtSearch.Text = "用户�";
//本页查询,使用js查询
function search()
{
txt = document.getElementById("txtSearch").value;
window.location = "search.aspx?q="+txt;
}后台直接是.cs
txtSearch.Text = this.Request.QueryString.Get("q");当输入查询条件"用户"时.可以正常返回,txtSearch.Text = "用户";
而,当输入查询条件"用户名"时,出现错误,txtSearch.Text = "用户�";
function GoUrl()
{
var Name = "中文参数";
location.href = "B.aspx?Name="+escape(Name);
}
</script>
http://www.84ren.com/simple/index.php?t12357.html
注意学会Google
requestEncoding="gb2312"
responseEncoding="gb2312"
/>
改这??
requestEncoding="gb2312"
responseEncoding="gb2312"
/>
window.location = "search.aspx?q="+Server.UrlEncode(txt);Server.UrlDecode(Request.QueryString.Get("q"));