JavaScript Example: Print This Page Unobtrusive
In this example, the left side provides the code used to render the output in the right side.
Feel free to copy and paste the code into your own project and modify as you wish.
About JavaScript
JavaScript is a scripting language that enables us to add functionality to web pages. We can combine JavaScript with our HTML code to achieve this outcome. We typically enclose our JavaScript inside <script>
tags, but we can also use event handlers (such as onclick
, onchange
, onmouseover
etc) within the HTML tags themselves to trigger the JavaScript.