Home > Backend Development > PHP Tutorial > 关于中文格式的输出

关于中文格式的输出

WBOY
Release: 2016-06-23 13:58:34
Original
844 people have browsed it

中文怎么选择输出格式?

比如我要把 :广州图书馆

输出为:%E5%B9%BF%E5%B7%9E%E5%9B%BE%E4%B9%A6%E9%A6%86


回复讨论(解决方案)

var str = "广州图书馆";  alert(encodeURI(str))
Copy after login

用urlencode函数

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