如何在不刷新jQuery的情况下发布表单? [英] How do I post a form without the page refreshing in jQuery?

查看:62
本文介绍了如何在不刷新jQuery的情况下发布表单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够在不刷新页面的情况下发布以下表格 在jQuery中,我需要将信息发布到actions.php中的表格

I want to be able to post the following form without the page refreshing in jquery and i need the form to post in information into actions.php

有人可以帮我吗?

<div id="postbox">
    <form method="post" id="ptowall">
        <input name="post" type="submit" value="Post" />
    </form>
</div>

谢谢.

推荐答案

$("#ptowall").bind("submit", function() { return false; });

$.post("your-form-submit-handler", $("#ptowall").serialize());

这篇关于如何在不刷新jQuery的情况下发布表单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆