nerdexam
National_Instruments

200-500 · Question #13

An HTML form contains this form element: <input type="image" name="myImage" src="image.png" /> The user clicks on the image to submit the form. How can you now access the relative coordinates of the…

The correct answer is D. $_POST['myImage_x'] and $_POST['myImage_y']. See the full explanation below for the reasoning.

Question

An HTML form contains this form element:

<input type="image" name="myImage" src="image.png" /> The user clicks on the image to submit the form. How can you now access the relative coordinates of the mouse click?

Options

  • A$_IMAGE['myImage']['x'] and $_IMAGE['myImage']['y']
  • B$_POST['myImage']['x'] and $_POST['myImage']['x']
  • C$_POST['myImage.x'] and $_POST['myImage.y']
  • D$_POST['myImage_x'] and $_POST['myImage_y']

How the community answered

(36 responses)
  • A
    6% (2)
  • B
    14% (5)
  • C
    3% (1)
  • D
    78% (28)

Community Discussion

No community discussion yet for this question.

Full 200-500 Practice