Home > Web Front-end > JS Tutorial > body text

javascript how to print

藏色散人
Release: 2021-03-30 14:18:11
Original
4411 people have browsed it

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>
Copy after login

javascript how to print

F12 debugging area, the code is as follows:

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

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template