mailto link not working within a frame chrome (over https)

后端 未结 7 1361
梦如初夏
梦如初夏 2020-12-09 02:25

I have a mailto link on a page. It works as expected when the page is loaded by itself.

However when the page is loaded via a frameset in Chrome nothing happens. Wit

7条回答
  •  囚心锁ツ
    2020-12-09 03:14

    Here is the solution I ended up with: Tested with Chrome, Firefox, IE6, IE7, IE8, IE9, IE10, IE11, Safari

    $("a[href^='mailto:']").on("click",function() {
        window.top.location = $(this).prop("href");
        return false;
    });
    

提交回复
热议问题