Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/434.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/369.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何从url地址中删除引号?_Javascript_Jquery - Fatal编程技术网

Javascript 如何从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

我正在更改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-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