6

Does the HTML onclick attribute work on iOS & android devices in both Chrome and Safiri.

E.g. If a HTML button has an onclick attribute to run a JavaScript function, will a touch gesture work as a click?

cleverpaul
  • 935
  • 4
  • 12
  • 28

1 Answers1

6

Yes it will work.

This has been answered here: Would onClick event work on touch on touch-screen devices?

See https://www.w3schools.com/tags/ev_onclick.asp for browser support

itodd
  • 2,278
  • 1
  • 14
  • 14