我使用Google Chrome和開發工具。
我知道如何打開DevTools,但如何與JS和HTML打開(DevTools):
Js打開devtools
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<button onclick="function()">Open Dev Tools</button>
<script type="text/javascript">
function function() {
"Code for Open DevTools ......"
};
</script>
</body>
</html>
但什麼是這個代碼代碼開放DevTools ......?
無法從代碼打開DevTools。可能重複這個:http://stackoverflow.com/questions/16660325/open-safari-google-chrome-developer-tools-programmatically-from-javascript – Lenny
@Lenny這不是重複的。如果用代碼打不開怎麼樣? 'F12' – user12345678
@Lenny我不想用'F12' – user12345678