简体   繁体   English

Django模板的Ajax发布

[英]ajax post for django template

HI all, 大家好,

I have a problem when i want to submit value then full page again reload. 我要提交值时出现问题,然后重新加载整页。 I want to update my table with asynchronous call, that specific information will be loaded but full page not... plz help me aboput this...thanks 我想通过异步调用更新我的表,该特定信息将被加载,但不会加载整页...请帮助我废除此...谢谢

Check out the jquery From plugin. 查看来自插件的jquery。 Will help you submit a form via ajax and then you can use the data that is sent back and update your table. 将帮助您通过ajax提交表单,然后您可以使用发送回的数据并更新表。

http://malsup.com/jquery/form/ http://malsup.com/jquery/form/

something like: 就像是:

$('#myForm1').ajaxForm({
    target: '#someid'
}); 

That will handle submitting the form via ajax and then what ever gets sent back will replace whatever is in 这将通过ajax处理提交表单,然后将退回的内容替换其中的任何内容

Should get you started in the right direction. 应该让您朝正确的方向开始。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM