我正在使用这段代码:
<script type = "text/javascript">
console.log("hello world");
</script>
如何查看console.log()
的输出?
我在Google上搜索了但没有找到解决方法。
我正在使用这段代码:
<script type = "text/javascript">
console.log("hello world");
</script>
如何查看console.log()
的输出?
我在Google上搜索了但没有找到解决方法。
您可以根据浏览器的不同打开错误控制台(例如,在Firefox中按Ctrl+Shift+J,在Chrome中按F12)。大多数浏览器将控制台隐藏在其开发者工具中。
console.log();
语句可以将任何内容打印到浏览器控制台中。开发者工具
或简单的工具
菜单。Cntrl+shift+j
键即可查看控制台。Ctrl+Shift+I
键并点击控制台即可查看Firefox上的控制台。<script type = "text/javascript">
console.log("hello world");
</script>
无效。请删除脚本标记中的空格,像这样:
<script type="text/javascript">
console.log("hello world");
</script>
在 Google Chrome 中按 F12 键,然后点击控制台以查看输出
对于 Chrome 浏览器,请按照以下步骤操作:
console.log()
无法输出到您的...。console.log()
,可以使用 document.write();
作为替代方案。