标签:round == ack path elf pre 输入 pat rip
输入 www.test.com、www.test.com/home
显示 www.test.com/home/index
<script> $(function () { //浏览器地址处理 if (window.location.pathname.toLowerCase().indexOf("home") == -1) { var pathname = window.location.pathname; pathname = pathname + ‘/home/index‘; pathname = pathname.replace("//", "/") window.open(window.location.origin + pathname, ‘_self‘); } else if (window.location.pathname.toLowerCase().indexOf("index") == -1) { var pathname = window.location.pathname; pathname = pathname + ‘/index‘; pathname = pathname.replace("//", "/") window.open(window.location.origin + pathname, ‘_self‘); } }); </script>
标签:round == ack path elf pre 输入 pat rip
原文地址:https://www.cnblogs.com/wxy520/p/11428436.html