2013-02-17 00:44
浏览 61


If I have a submit button that will execute a PHP script, can I execute it without actually going to that page, i.e.: process.php? I'm used to JavaScript being able to do this.

(For the record, I'm talking about without AJAX, without redirecting once on that other page, and no, I'm not very hopeful.)

图片转代码服务由CSDN问答提供 功能建议

如果我有一个执行PHP脚本的提交按钮,我是否可以执行它而无需实际访问该页面, 即:process.php? 我已经习惯了JavaScript能够做到这一点。

(对于记录,我说的是没有AJAX,没有重定向一次在其他页面上,不,我是 不是很有希望。)

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

3条回答 默认 最新

  • dshgdhdfcas30210 2013-02-17 00:46

    The reason you are able to do this with JavaScript is because JavaScript can execute within the browser on the client side. PHP on the other hand ALWAYS executes on the server and returns HTML to the client.In short, no you can't.

    解决 无用
    打赏 举报

相关推荐 更多相似问题