带刷新页面的后退按钮

时间:2015-05-29 13:06:05

标签: javascript html

如何使用后退按钮中的刷新页面返回。我用谷歌搜索它,但对我不起作用。 问题说明: 我的页面中有一个后退按钮。当我点击这个按钮时,它会回到上一页。但我希望我什么时候点击后退按钮然后返回并加载一个新的刷新页面。

2 个答案:

答案 0 :(得分:0)

你可以试试这个

Create function  getbyID  ( @id int )
Returns table
as 
return( 
select * from Products 
where  
ProductID=@id AND
ProductID > 10)

答案 1 :(得分:0)

你可以这样做:

<强>的JavaScript

function goBackWithRefresh()
{
    var last_url = document.referrer;

    if( last_url )
    {
        window.location.href= last_url;
    } else {
        window.history.back();
    }
}

<强>触发

<a href="javascript:goBackWithRefresh();">my back button link</a>