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

关于中文格式的输出

WBOY
WBOYOriginal
2016-06-23 13:58:34822browse

中文怎么选择输出格式?

比如我要把 :广州图书馆

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


回复讨论(解决方案)

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

用urlencode函数

Statement:
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