Home > Backend Development > PHP Tutorial > 关于汉语格式的输出

关于汉语格式的输出

WBOY
Release: 2016-06-13 11:55:20
Original
929 people have browsed it

关于中文格式的输出
中文怎么选择输出格式?

比如我要把 :广州图书馆

输出为:%E5%B9%BF%E5%B7%9E%E5%9B%BE%E4%B9%A6%E9%A6%86
------解决方案--------------------

var str = "广州图书馆";<br />  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