Question
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
<button script = "random();" >``
<button onclick = "random();" >``
<button function = "random();" >``
None of the options
Answers
GPT 3.5
The correct answer is:
<button onclick = "random();" >``
<button onclick = "random();" >``