Home > Web Front-end > JS Tutorial > body text

Script code to implement UrlEncode and UrlDecode with JavaScript_javascript skills

WBOY
Release: 2016-05-16 19:02:33
Original
1172 people have browsed it

Copy code The code is as follows:


Convert vbscript function into javascript for easy use in non-IE browsers

Copy code The code is as follows:

function str2asc(strstr){
return (" 0" strstr.charCodeAt(0).toString(16)).slice(-2);
}
function asc2str(ascasc){
return String.fromCharCode(ascasc);
}

Copy code The code is as follows:




Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template