Code script để chuyển hướng người dùng khi Click Back Pre-Langding page những vẫn chuyển đến Landing page.

Chèn code script này trước thẻ <body>

<!--back to LP when click Back-->
<script type="text/javascript">function getParameterByName(e,r){r||(r=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var o=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(r);return o?o[2]?decodeURIComponent(o[2].replace(/\+/g," ")):"":null}var lp_href;(lp_href=getParameterByName("lp_href"))&&""!=lp_href?lp_href+=location.search:lp_href=$("a.pre-link").attr("href")+location.search,$("a.pre-link").attr("href",lp_href),jQuery(document).ready(function(e){window.history&&window.history.pushState&&(e(window).on("popstate",function(){if(""!==location.hash.split("#!/")[1]&&""===window.location.hash)return window.location.href=lp_href,!1}),window.history.pushState("forward",null,location.search+"#forward"))});</script>

LEAVE A REPLY

Please enter your comment!
Please enter your name here