admin管理员组

文章数量:1287839

I need to make URL from some custom string values dynamically. I have doubt on encodeURIComponent(string) function whether it has cross browser issues does anyone experienced trouble with this function (I am not using any JS libraries)?

I need to make URL from some custom string values dynamically. I have doubt on encodeURIComponent(string) function whether it has cross browser issues does anyone experienced trouble with this function (I am not using any JS libraries)?

Share Improve this question edited Apr 1, 2023 at 19:35 Brian Tompsett - 汤莱恩 5,89372 gold badges61 silver badges133 bronze badges asked Dec 10, 2010 at 9:57 DSharperDSharper 3,2179 gold badges31 silver badges47 bronze badges 1
  • Also see: stackoverflow./questions/75980/… – Christophe Roussy Commented Jun 13, 2016 at 8:32
Add a ment  | 

2 Answers 2

Reset to default 9

encodeURIComponent works as advertised in a cross-browser fashion. Use it in preference to escape.

Go for it. This is exactly what encodeURIComponent is for and it's well-supported across browsers. I've never heard of a serious issue with it on any major implementation.

本文标签: