chrome 右鍵頁面無反應
有一些頁面用chrome打開時,f12無法打開開發者工具,右鍵也被屏蔽了,無法復制、審查元素等。例如http://cesium.xin/
后來在網上找到2種解決方案,下面詳細說一下
1.添加網頁,將下面代碼復制到網址欄,然后遇到禁止右鍵的頁面,左鍵點一下該書簽就OK了~~
2.在網頁上按ctrl+shift+i快捷鍵打開開發者工具或者點擊網頁右上角的三個點找到更多工具再找到開發者工具。在console中粘貼如下代碼並按回車鍵,問題得以解決
代碼:
javascript:(function() { function R(a){ona = "on"+a; if(window.addEventListener) window.addEventListener(a, function (e) { for(var n=e.originalTarget; n; n=n.parentNode) n[ona]=null; }, true); window[ona]=null; document[ona]=null; if(document.body) document.body[ona]=null; } R("contextmenu"); R("click"); R("mousedown"); R("mouseup"); R("selectstart");})()
參考自https://www.cnblogs.com/lcj0308/p/4624294.html