html, JavaScript, URL special character escapes in the actual programming are useful, some people on the use of special character escapes is not very clear, the following on the escape of Html,javascript,url special characters to do a description
URLs appear with A +, space,/,?,%,#,&,= and other special symbols, may not be able to get the correct parameter value on the server side.Case:src= "barcode39.aspx?barcodevalue=http://www.baidu.com.cn:8066/order/ Inputtraininginfo_kcsj.aspx?
Use JavaScript to process the two function codes of the URL: function request (paras) {// obtain the url parameter value, case-insensitive. If this parameter is not found, an empty string is returned.
Var url = location. href;
Var paraString = url.
Principles of URL escape characters
If the form action is list. JSF? Act = Go & State = 5
Then, request. getparameter can be used to obtain the values of act and state.
If your intention is the act = 'go & State = 5' string, You must escape &
Spaces-%20
"-%22
#-%23
%-%25
&-%26
(-%28
)-%29
+-%2B
,-%2c
/-%2F
:-%3a
; -%3b
=-%3d
>-%3e
? -%3f
@-%40
\-%5C
| -%7c
Passing special characters such as a plus sign in a URL
Some characters in the URL are escaped, such as the space is encoded into
URLs appear with +, spaces,/,?,%,#,&,= and other special symbols, may not be able to get the correct parameter value on the server side, how is good?Workaround: Convert these characters into characters that the server can recognize, corresponding to
We all know that the transmission of the parameters in the HTTP protocol is a "Key=value" in the form of a, if you want to pass multiple parameters, you need to use the "&" symbol to split the key value pairs. such as "? Name1=value1&name2=value2",
URLs are standardized names for internet Resources. The URL points to each electronic message, tells them where it is, and how to interact with it.
URL syntax, and the meanings of various URL components and their Work.
Many Web clients
The solution of URL passing parameters (special characters) in JavaScript and the introduction of transcoding decoding some symbols cannot be passed directly in the URL, and if you want to pass these special symbols in the URL, use their encoding.
Apache URL rewriting rules and apacheurl Rewriting1. Introduction
The rewrite function of Apached is the mod_rewrite module function, which is a module of apache. It is very powerful and can operate all parts of the URL.
Therefore, we can rewrite
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.