相关疑难解决方法(0)

重定向/返回Django中的同一页面(上一页)?

当您想要将用户返回到Django中的同一页面时,有哪些选项以及每个页面的优缺点是什么?

方法我知道:

  • HTTP_REFERER
  • 包含先前URL的GET参数
  • 用于存储先前URL的会话数据

还有别的吗?

django django-views

55
推荐指数
3
解决办法
5万
查看次数

如何刷新后退按钮点击页面?

我使用.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';
?>
Run Code Online (Sandbox Code Playgroud)

到目前为止,我已尝试过但未能使用: window.onbeforeunload body onunload=""

必须有办法onunload=location.reload()或某事!不知何故必须知道语法!!

javascript php ajax .htaccess jquery

23
推荐指数
5
解决办法
9万
查看次数

标签 统计

.htaccess ×1

ajax ×1

django ×1

django-views ×1

javascript ×1

jquery ×1

php ×1