开发者

Ajax - Back button?

开发者 https://www.devze.com 2023-01-03 10:32 出处:网络
I have the following jQuery code: $(\"a\").click(function() { if ($(this).attr(\'href\') != \'#\') { if (strpos($(this).attr(\'href\'), \'mob.php\') !== false) {

I have the following jQuery code:

$("a").click(function() {
    if ($(this).attr('href') != '#') {
        if (strpos($(this).attr('href'), 'mob.php') !== false) {
            $.ajax({
              url: $(this).attr('href')+"&logo=0",
              cache: false,
              success: function(html){
                $("#ajax").html(html);
              }
            });
            return false;
        }
    }
});

The problem is that whe开发者_开发知识库n someone presses the back button they leave the website instead of going back to the previous page. Is there a work around for this?

0

精彩评论

暂无评论...
验证码 换一张
取 消