No1.html:
<style>
.fui-header a.backcom:before {
content: " ";
display: inline-block;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
height: 0.5rem;
width: 0.5rem;
border-width: 0 0 2px 2px;
border-color: #666;
border-style: solid;
position: relative;
top:0;
}
</style>
<div class="fui-header">
<a class="backcom"></a>
</div>
<script>
$(document).ready(function ()
{
var url = location.href;
var times = url.split("&");
var index = times.indexOf('r=order.create');
times.splice(index, 1);
url = times.join("&");
url += "&r=member.cart&1";
alert(url);
$(".backcom").attr("href",url);
/*此处只是个例子可以看逻辑就是在当前的url上拼接一个1*/
})
</script>
No2.html
<script>
$(document).ready(function ()
{
var url = location.href;
var times = url.split("&");
if (times.indexOf('1') != -1) {
var index = times.indexOf('1');
times.splice(index, 1);
url = times.join("&");
self.location.replace(url);
if(times.indexOf('1') == -1)
{
window.location.href(url);
}
}
})
/*此处的代码直接粘贴到要跳转的那个页面就可以了,会实现跳转至此页面进行刷新操作,具体逻辑当时写完忘记啦哈哈哈*/
<script/>
上面style样式是一个返回键头的样式 如下图