console.log を使用して文字列を表示すると、Chrome は文字列の特定の部分をリンクとして解釈し、それに応じてコンソール出力を装飾します。どうすればそれを防ぐことができますか?この問題を示すサンプルを次に示します。2 番目の console.log ステートメントの出力にはリンクがありませんが、Chrome はまだその一部をハイパーリンクとして解釈していることに注意してください。
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
</head>
<body>
<p id="jedi_mind_trick">This is not the demo you are looking for. Move along!</p>
</body>
<script>
function example() {
var test = {data:$('#jedi_mind_trick').html(),obi_wan:"kenobi"};
}
console.log(typeof example, example);
console.log(typeof example.toString(), example.toString());
</script>
</html>