在查询字符串传递时间如何编码和检索时间如何解码? 注意:在查询字符串值中包含/斜杠和+加符号 问候 Aravind 解决方案 ( #docFrame)。attr( src, http:// + localStorage.serverip + /Services/viewe.aspx?filepath = + escape (filePath)+ & userid = + escape (localStorage.userid)) 并在vb代码的asp页面中检索 Dim userid As String = Microsoft.JScript.GlobalObject.unescape(Request.QueryString ( userid)) Dim filepath As String = Microsoft.JScript.GlobalObject.unescape(Request.QueryString ( filepath))' 这里我在QueryString中得到{filepath = aaaaaa%255Cbizhub ++++ 405.pdf& userid = 117} 当我获得价值时 filepath as aaaaaa / Cbizhub 405 .pdf 和 userid as 117 W缺少文件路径值++++吗? 请告诉我如何获取文件路径aaaaaa / Cbizhub + +++ 405.pdf 在查询字符串传递时间如何编码和检索时间如何解码? 注意:在查询字符串值中包含/斜杠和+加符号 问候 Aravind Hi 如果我使用encodeURIComponent和decodeURIComponent那么它工作正常 ( #docFrame)。attr( src, http:// + localStorage.serverip + / Services / viewe.aspx?filepath = + encodeURIComponent(filePath)+ & userid = + escape ( localStorage.userid)) 和asp页面 Dim userid As String = Microsoft.JScript.GlobalObject.decodeURIComponent(Request.QueryString( userid )) Dim filepath As String = Microsoft.JScript.GlobalObject.decodeURIComponent(Request.QueryString( filepath )) 问候 Aravind Hi I am pass query sting from one page to another page,like from javascript code to vb code as follows$("#docFrame").attr("src", "http://" + localStorage.serverip + "/Services/viewe.aspx?filepath=" + escape(filePath) + "&userid=" + escape(localStorage.userid))and retrieve in asp page in vb code Dim userid As String = Microsoft.JScript.GlobalObject.unescape(Request.QueryString("userid"))Dim filepath As String = Microsoft.JScript.GlobalObject.unescape(Request.QueryString("filepath"))'Here i get {filepath=aaaaaa%255Cbizhub++++405.pdf&userid=117} in QueryStringwhen i get value in filepath as aaaaaa/Cbizhub 405.pdf and userid as 117Why in filepath value "++++" is missing ?Pls tell me how to get filepath like "aaaaaa/Cbizhub++++405.pdf"In query string pass time how to encode and in retrieve time how to decode ?Note:in query string values contain "/" slash and "+" plus symbols Regards Aravind 解决方案 ("#docFrame").attr("src", "http://" + localStorage.serverip + "/Services/viewe.aspx?filepath=" + escape(filePath) + "&userid=" + escape(localStorage.userid))and retrieve in asp page in vb code Dim userid As String = Microsoft.JScript.GlobalObject.unescape(Request.QueryString("userid"))Dim filepath As String = Microsoft.JScript.GlobalObject.unescape(Request.QueryString("filepath"))'Here i get {filepath=aaaaaa%255Cbizhub++++405.pdf&userid=117} in QueryStringwhen i get value in filepath as aaaaaa/Cbizhub 405.pdf and userid as 117Why in filepath value "++++" is missing ?Pls tell me how to get filepath like "aaaaaa/Cbizhub++++405.pdf"In query string pass time how to encode and in retrieve time how to decode ?Note:in query string values contain "/" slash and "+" plus symbols Regards AravindHi If i use encodeURIComponent and decodeURIComponent then it work fine("#docFrame").attr("src", "http://" + localStorage.serverip + "/Services/viewe.aspx?filepath=" + encodeURIComponent (filePath) + "&userid=" + escape(localStorage.userid))and in asp pageDim userid As String = Microsoft.JScript.GlobalObject.decodeURIComponent(Request.QueryString("userid")) Dim filepath As String = Microsoft.JScript.GlobalObject.decodeURIComponent(Request.QueryString("filepath"))Regards Aravind 这篇关于如何在查询字符串中传递值并返回,就像通过时一样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-24 16:07