2013-02-15 133 views
1

我嘗試這個書籤如何防止書籤自動重新加載頁面?

javascript:window.prompt("Title: " +document.title.length+ "/69\n\n" +document.title+ "\n\nCopy Title to clipboard: Ctrl+C, Enter",document.title); 

我試圖得到一個字符數和一個簡單的方法把它複製到剪貼板,但由於某種原因一起顯示在頁面的標題就說明所需的後信息,頁面重新加載

任何想法爲什麼這可能是這種情況?

+0

UPDATE:這應該解決這個問題:http://stackoverflow.com/questions/13796004/how-to-prevent-bookmarklet-from-loading-its-result?rq=1 – 2013-02-15 23:50:43

回答

1

附加無效(0)到您的書籤結束

的javascript:window.prompt( 「標題:」 + document.title.length + 「/ 69 \ n \ n」 個 + document.title時+ 「\ n \ n將標題複製到剪貼板:Ctrl + C,Enter」,document.title); void(0);

+0

感謝隊友,做的招 – 2013-02-16 21:53:13