百分比编码javascript [英] Percent encoding javascript
本文介绍了百分比编码javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有一个javascript函数接受一个字符串并将其转换为另一个百分比编码的字符串?那样的This Guy变成了This%20Guy。
Is there a javascript function that takes a string and converts it into another string that is percent-encoded? That way something like "This Guy" turns into "This%20Guy".
谢谢
推荐答案
尝试 encodeURIComponent()或转义()
这篇关于百分比编码javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文