如何通过定位弹出书签

时间:2019-03-23 01:13:51

标签: jquery bookmarklet

使用以下代码,我可以弹出Bookmarklet ...我希望它是居中的,但是弹出窗口始终显示在最右端... 任何指针表示赞赏

<a class="btn btn-primary btn-block margin-bottom"
    href='javascript:
    (function()
    {
    var n = encodeURIComponent(location.href);
    var i = encodeURIComponent(document.title);
    var a=window;
    window.open("https://MyUrl?url="+n+"&title="+i,"_blank","
    toolbar=0,
    menubar=0,
    height=" + (screen.height / 2) + ",
    width= " + (screen.width / 2) ,
    left=  " + (a.width() / 2) - (width / 2)",
    top=   " + (a.height() / 2) - (height / 2) +");
    })(); void(0);'>Bookmarklet</a>

0 个答案:

没有答案