Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在图像的 onclick 事件中用 JavaScript 提交表单,问题是如何在 PHP 中知道我来自图像提交?
if(isset(??)) { //submission code }
注意:表单动作是$PHP_MYSELF
$PHP_MYSELF
您也许可以在表单中放置一个隐藏字段并对其进行测试。
既然您要提交表单,为什么不使用以下方法检查 PHP 中的表单提交:
if(isset($_POST)) { //do code }