Unstoppable Domains

Javascript to show/hide div

Spaceship Spaceship
Watch
Impact
24
Hi,

I want to display a div if the user has javascript enabled and display nothing if javascript is disabled.

Any help is greatly appreciated.

Thanks!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable DomainsUnstoppable Domains
I think that that'd be simply:

Code:
<script type="text/javascript">
document.write('<div>JavaScript is enabled, hence why you are seeing this.</div>');
</script>
<noscript>
</noscript>

The <noscript> tags aren't necessarily needed; feel free to remove them.
 
1
•••
Worked perfectly. Thanks! Rep + NP$ sent.
 
0
•••
Appraise.net

We're social

Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back