javascript:location.href="googlechrome"+location.href.substring(4);
2. 隨意打開一個(gè)網(wǎng)頁(yè)并選擇“添加為書簽”
在書簽欄找到剛添加的書簽并編輯
隨意變個(gè)名稱,比如“發(fā)送標(biāo)簽到Chrome” ;在地址欄將網(wǎng)址清除,將js代碼貼進(jìn)去
好了,打開網(wǎng)頁(yè),直接點(diǎn)擊“發(fā)送標(biāo)簽到Chrome” 這個(gè)書簽就能看到窗口會(huì)自動(dòng)從Safari切換至Chrome繼續(xù)瀏覽網(wǎng)頁(yè)。
如果以上js代碼不適用于你當(dāng)前的設(shè)備,可以嘗試下面兩個(gè)代碼:
javascript:location.href=%22googlechrome%22+location.href.substring(4);
https URLs:?javascript:location=location.href.replace(/^https?/, 'googlechrome');
.