Does javascript onclick support cross browser?
6 answers
Can I use the following in all browsers?
Yes
Is this “bad practice” regarding standards?
“Bad practice” and “compliance with standards” are two different things. This is up to standards, but also for three reasons for bad practice.
- It is not unobtrusive . Event handlers are better used with JS.
- It links to the top of the page (
#) and will always send the browser there, even if JS starts up. - JS , . , .
IE, FF, Safari Chrome?
+9