HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <script> // Dummy script tag </script> <p>Click on the button to count the number of script tag(s) used in this document.</p> <button onclick="myFunction()">Click Me</button> <p id="point"></p> <script> var x = document.getElementById("point"); function myFunction(){ x.innerHTML = document.scripts.length; } </script> </body> </html>
OUTPUT
×

Save as Private