Javascript 如何从url地址中删除引号?
我正在更改url:Javascript 如何从url地址中删除引号?,javascript,jquery,Javascript,Jquery,我正在更改url: history.replaceState('data to be passed', 'Title of the page', '<?php echo getAddress(); ?>/?usp-custom-14="'+urldates+'"&usp-custom-8="'+title+'"'); 我需要删除”,以便: https://example.com/test/results/?usp-custom-14=1800+2017&usp-cu
history.replaceState('data to be passed', 'Title of the page', '<?php echo getAddress(); ?>/?usp-custom-14="'+urldates+'"&usp-custom-8="'+title+'"');
我需要删除”
,以便:
https://example.com/test/results/?usp-custom-14=1800+2017&usp-custom-8=United%20States
istory.replaceState('要传递的数据','页面标题','/?usp-custom-14='+urldates+'&usp-custom-8='+Title+');
使用以下方法:
var url = 'https://example.com/test/results/?usp-custom-14="1934+2017"&usp-custom-8="United%20States"'
url = url.replace(/"/g,"");
alert(url) //check the value
你不能从代码中删除
“
”历史记录。replaceState('data to passed','Title of the page','/?usp-custom-14='+urldates+'&usp-custom-8='+Title);“+urldates+'”到'+urldates+'
?没门。.哈哈!需要一个断点结尾不需要++'
istory.replaceState('data to be passed', 'Title of the page', '<?php echo getAddress(); ?>/?usp-custom-14='+urldates+'&usp-custom-8='+title+'');
var url = 'https://example.com/test/results/?usp-custom-14="1934+2017"&usp-custom-8="United%20States"'
url = url.replace(/"/g,"");
alert(url) //check the value