zoukankan      html  css  js  c++  java
  • wap手机端解决返回上一页,js

     <input id="hd_referrer" type="hidden" />
                    <a href="javascript:void(0)" onclick="referurl(); ">返回 </a>
                    <script>
                        $(function () {
                            $("#hd_referrer").val(document.referrer);
                        });

                        function referurl() {
                            var ref = $("#hd_referrer").val();
                            if (ref != "" && ref != "undefined") {
                                location.href = ref;
                            }
                            else {
                                location.href = history.back(-1);
                            }
                        }
                    </script>

  • 相关阅读:
    HDU-1527 取石子游戏
    HDU-1846 Brave Game
    HDU-1850 Being a Good Boy in Spring Festival
    HDU-2509 Be the Winner
    HDU-1907 John
    HDU-1969 Pie
    HDU-1501 Zipper
    HDU-2289 Cup
    最大子矩阵和
    HDU3466(01背包变种)
  • 原文地址:https://www.cnblogs.com/qigege/p/5151564.html
Copyright © 2011-2022 走看看