Opera 输入无法 POST
我创建了一个脚本,可以自动将数据发布到页面。它可以在下面找到:
echo '
<html>
<body onLoad="javascript: document.process.submit();">
<form method="post" action="pagehere.php" name="process">
';
foreach($post_data as $k => $v) {
echo "<input type='hidden' name='$k' value='$v' />";
}
echo '
<input type="submit">
</form>
</body>
</html>
';
它在除 Opera 之外的所有其他浏览器中按预期工作(在版本 11.50 上进行测试)。
我尝试删除 JS 并用标准提交按钮替换它,但没有成功。我还尝试使用标准 标签进行测试,但再次没有运气。哦,用 jQuery 提交也没有成功,尽管 IE/FF 也可以。
我是否错过了一些愚蠢的事情,或者这是一个非常奇怪的问题?
谢谢。
I have created a script which posts data to a page automatically. It can be found below:
echo '
<html>
<body onLoad="javascript: document.process.submit();">
<form method="post" action="pagehere.php" name="process">
';
foreach($post_data as $k => $v) {
echo "<input type='hidden' name='$k' value='$v' />";
}
echo '
<input type="submit">
</form>
</body>
</html>
';
It works as intended in all other browsers apart from Opera (testing on version 11.50). The <form action>
attribute works and the user is redirected to the new page. However, the hidden input fields are not sent to the new page.
I have tried removing the JS and replacing it with a standard submit button, with no luck. I have also tried using standard <input type="text">
tags just to test, and again, have had no luck. Oh, and no luck submitting with jQuery either, although that again was fine with IE/FF.
Am I missing something stupid, or is this a very strange problem?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过几个小时的互联网搜索后,事实证明我完全看错了。 Opera 中的代理设置未针对我的开发环境正确配置...
感谢所有不厌其烦阅读/回答的人。
After hours of searching the internet, it turned out I was looking at the wrong thing completely. The proxy settings in Opera were not configured correctly for my development environment...
Thanks to everybody who took the trouble to read/answer.