You may not want to just hide something if JavaScript is enabled. Often what you will really need is to have different content depending on whether or not JavaScript is enabled.
This example shows you how you can have one thing display when JavaScript is not available and then update it to display something different when JavaScript is enabled. In this particular example one word in the middle of a sentence is changed but the method is equally applicable to substituting as much or little of the page content as you need to.
This example shows you how you can have one thing display when JavaScript is not available and then update it to display something different when JavaScript is enabled. In this particular example one word in the middle of a sentence is changed but the method is equally applicable to substituting as much or little of the page content as you need to.
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<head>
<title>Example 03</title>
</head>
<body>
<p>JavaScript is <span id="ex">not</span> available.</p>
<script type="text/javascript" src="example03.js"></script>
</body>
</html>
JavaScript
document.getElementById('ex').innerHTML = 'definitely';
Tags
PHP
Programming
C C++
ASP
Development Tools
Ajax
XML
Javascript
Python
VB
VC
perl
dephi
Ruby
sql
technology
Microsoft Access
Excel
ffice
Powerpoint
Word
Oracle
Related Posts "Technology"
-
Business Presentations…Make them Effective with right PPT Templates
7/11/2019 3:02:00 PM
You might also like on "Technology"
How To Build A Website Using WordPress In Ten Minutes
7/10/2019 8:05:00 PM
Website Creation Utilizing Search Engine Optimisation Under Consideration
7/10/2019 6:35:00 PM
Useful WordPress Website Design Tips
7/10/2019 3:19:00 PM
Barricades Involved In Mobile Application Testing
7/10/2019 1:27:00 PM
Hire PHP Developers India for Efficient PHP Web Development
7/10/2019 10:54:00 AM
Changing Your Logo Seamlessly
7/9/2019 8:22:00 PM
Are You Loan-Worthy? 5 Ways to Improve the Odds of Acceptance
7/9/2019 8:03:00 PM
Relevance Of Custom Website Design For Niche Audience
7/9/2019 7:30:00 PM
You Must Understand and Use Responsive Web Design
7/9/2019 4:51:00 PM
Web Design Development: A Dime a Dozen
7/9/2019 3:33:00 PM
A Great Way To Start Earning Money Online Is With An Affiliate Site
7/8/2019 4:43:00 PM