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?

有帮助吗?

解决方案

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

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

其他提示

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top