在另一个Div中显示提交的javascriptMVC表单数据

发布于 2024-12-26 07:31:50 字数 134 浏览 2 评论 0原文

我正在使用 javascriptMVC,我遇到的问题是这样的。

我有一个包含几乎所有输入类型的表单,当我在表单上提交时,我希望数据显示在它旁边的另一个 Div 中。我不想使用数据库。我只想使用使用 MVC 框架生成时创建的文件来执行此操作

I am using javascriptMVC and the issue I have is this.

I have a form with almost all the types of Input, and when I submit on the form I want the data displayed in another Div next to it. I don't want to use a Database. I want to do it only using files created when generated using MVC framework

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

长不大的小祸害 2025-01-02 07:31:50

尝试使用 jQuery post

$.post("post_your_data_to_this_site.php", $("#idOfYourForm").serialize(), function(data) {
  // add result of post_your_data_to_this_site.php into div
  $('#yourSubDivId').html(data);
});

如果这不适合您,请解释原因。

问候

Try to use jQuery post

$.post("post_your_data_to_this_site.php", $("#idOfYourForm").serialize(), function(data) {
  // add result of post_your_data_to_this_site.php into div
  $('#yourSubDivId').html(data);
});

If this is not working for you please explain why.

Regards

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文