我有一种可能的方式在jQuery url中使用GET
变量。就像在PHP中,我们有这样的事情:JQuery URL GET变量
header('location : path/to/page.php?id='.$id);
,并在page.php文件,我们这样做:
$id = $_GET['id'];
所以在jQuery的,我们可以这样做:
window.location.replace(path/to/page.html/* and pass the url query here*/);
为什么要投票? –
你想重写路径'path/to/page.php?id =?'到'path/to/page.html'为什么不使用htaccess? – madalinivascu