Would onClick event work on touch on touch-screen devices?

onclick works fine on touchscreens; I’ve used it several times and have never had any problem.

You could consider using onmousedown instead of onclick. Or use jQuery to detect taps.

Leave a Comment