0
Best Collegue,如何阻止IE瀏覽器阻止彈出窗口的小冊子與pinterest相同
我爲IE創建了一個小書籤,並且遇到了以下問題。當用戶在bookmarklet工具欄中拖動我的書籤並點擊它時,如果用戶想要允許彈出窗口,IE會顯示一個對話框。但Pinterest可以避免這種情況,有人可以告訴我如何找到解決這個問題的方法嗎?
我的extern js文件看起來像:
function Bookmarker(){
initialize();
}
function initialize(){
var url = document.location.href;
loadBookMarkLet(url);
}
function loadBookMarkLet(url) {
newwindow = window.open('http://bookmarker.symbaloo.com/?url='+encodeURIComponent(url),'Bookmarklet','toolbar=no,width=550,height=330,left=500,top=200, status=no,scrollbars=no,resize=no');
setTimeout(function() {
newwindow.focus();
}, 0);
}
new Bookmarker();
我的index.html文件看起來像:
<a href="javascript:(function(){script=document.createElement('SCRIPT');script.type='text/javascript';script.src='http://navidmirzaie.com/bookmarklet/default.js?x='+(Math.random());document.getElementsByTagName('head')[0].appendChild(script);})();" icon="bookmarker_icon.ico">Symbaloo Bookmarklet</a>
我會非常gratefull。
Tnx in advanced。
非常感謝你,我會試試:) – Navid