我使用 .htaccess 文件将所有流量路由到单个 index.php 文件。以下代码用于指导流量,但出现了无法使用回退按钮的问题。我不知道该怎么做才能让回退按钮正常工作。我尝试了各种方法并进行了大量的谷歌搜索,但都没有解决问题,因此希望这里的某个人能提供帮助!
<?php
if(isset($_GET['parameters'])) {
if($_GET['parameters'] == "repair")
include 'repair.html';
else if($_GET['parameters'] == "training")
include 'training.html';
else if($_GET['parameters'] == "products")
include 'products.html';
else if($_GET['parameters'] == "about")
include 'about.html';
else if($_GET['parameters'] == "employees")
include 'employees.html';
else if($_GET['parameters'] == "training")
include 'training.html';
else if($_GET['parameters'] == "newaccount")
include 'newaccount.html';
else if($_GET['parameters'] == "contact")
include 'contact.html';
else if($_GET['parameters'] == "recommended")
include 'recommended.html';
else if($_GET['parameters'] == "careers")
include 'careers.html';
else
include 'home.html';
}
else
include 'home.html';
?>
到目前为止,我已经尝试并未能使用:window.onbeforeunload
body onunload = ""
一定有一种方法可以实现 onunload = location.reload()
或其他类似的功能!只是需要知道正确的语法!!