POST变量在FF3.6中正确发送,但在FF4 beta中没有发送

时间:2010-08-19 08:27:22

标签: php firefox post

任何人都可以想到为什么$ _POST变量可能在Firefox 3.6上正确发送而在Firefox 4 beta中没有正确发送的原因。我有print_r($ _ POST),这个值在FF4中根本不显示。这是输入html:

<input type="image" src="images/btn_preview.gif" value="preview" name="buttonPreview"/>

FF3.6中POST阵列的最后一行:

[chkOrganiser] => 1 [buttonPreview_x] => 54 [buttonPreview_y] => 22 [buttonPreview] => preview )

FF4.0中POST阵列的最后一行:

[chkOrganiser] => 1 [buttonPreview_x] => 58 [buttonPreview_y] => 20 )  

1 个答案:

答案 0 :(得分:3)

请参阅https://bugzilla.mozilla.org/show_bug.cgi?id=583211

Firefox 4: Html input type image only submits x and y, not name when clicked.

[...]

Thanks a lot for this bug report!

However, our behavior is correct according to HTML5, which we're tracking:
<http://www.whatwg.org/html/#form-submission-algorithm>, step 7, substep 3
requires just image-button.x and image-button.y to be appended to the /form
data set/, which will be submitted.

It looks like the specification follows IE and Opera in this case. If you'd
like to see this changed, please submit a bug to
, component
"HTML5 spec (editor: Ian Hickson)", or send an email to .