Home  >  Article  >  Web Front-end  >  javascript how to print

javascript how to print

藏色散人
藏色散人Original
2021-03-30 14:18:114394browse

Javascript print output method: 1. Print output through "window.alert('pop-up window debugging');" method; 2. Print output through "console.table(ars);" method.

javascript how to print

The operating environment of this article: Windows 7 system, JavaScript version 1.8.5, DELL G3 computer.

Pop-up window debugging, the code is as follows:

<script>
window.alert(&#39;弹出窗口调试&#39;);
</script>

javascript how to print

F12 debugging area, the code is as follows:

<script>
console.log(&#39;调试区&#39;);
</script>

javascript how to print

It is very useful when printing complex arrays. The code is as follows:

<script>
var ars = [&#39;d&#39;,&#39;s&#39;,&#39;ee&#39;];
console.table(ars);
</script>

javascript how to print

[Recommended learning: js basic tutorial]

The above is the detailed content of javascript how to print. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn