开发者

remove quotes from variable in javascript?

开发者 https://www.devze.com 2022-12-14 11:11 出处:网络
I really don\'t understand Javascr开发者_如何学Pythonipt. In PHP, I can remove quotes like this:

I really don't understand Javascr开发者_如何学Pythonipt.

In PHP, I can remove quotes like this:

$tags_array = preg_replace('/"/', '', $tags_array);

How do I write it in Javascript?


str = str.replace(/"/g, '');


You can do almost the same thing with javascript what you do with php, i mean many functions, here is the solution:

PHPJS

0

精彩评论

暂无评论...
验证码 换一张
取 消