I have a list item with an onclick
event. It runs in Chrome and Internet Explorer, but not Firefox. Any suggestions?
<li onclick="alert('test');">test test<br></li>
This works fine for me in Firefox.
Check this:
JavaScript is enabled in your browser.
Try adding a return false;
statement in your tag.
Or a function like this:
function test() {
//your code here
return false;
}
<a href="#" onclick="alert('hi');">Link</a>
or this
<a href="javascript:void(0)" onclick="alert('hi');">Link</a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With