Which of the following code-snippet calls the random function on the button click?

<button script = "random();" >``

<button onclick = "random();" >``

<button function = "random();" >``

None of the options

1 answer

The correct answer is:

<button onclick = "random();" >``