Mid
From PDF
JavaScript
JavaScript
Explain the difference between <script> and <noscript>.
- <script> runs JavaScript.
- <noscript> displays content when JavaScript is disabled or not supported.
Example:
<script>
document.write("JavaScript is enabled!");
Follow me on LinkedIn:
</script>
<noscript>
<p>Please enable JavaScript to view this content.</p>
</noscript>
Key Takeaway:
<noscript> provides graceful fallback content.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png