Question

I have 6 div's that have onclick javascript. When you click them a part of the site changes.

I want these divs to contain links if javascript is disabled. (instead of changing the part of the page link to another page)

How would I do that?

Was it helpful?

Solution

<div>
   <a href="noscript.htm" onclick="window.location='script.htm';return false;">button</a>
</div>

something like this?​ http://jsfiddle.net/C6BJT/

OTHER TIPS

Can't you just use a link in the html and swap it with js when you need it to be a button?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top