简体   繁体   中英

Submit Form with AJAX

I would like to submit a very simple form with an XMLHttpRequest. (I don't want to bother with jQuery). All this form does is insert a full name, a username, and a password into our db. I would like for the row to be inserted into the db without refreshing the page, and have the php file send a message back on whether it inserted the row or not. I have experience with creating a live search with AJAX, but have limited experience with submitting forms.

Code samples of an ajax call, along with a sample form would be greatly appreciated.

这里似乎有一个很好的例子: http : //www.captain.at/howto-ajax-form-post-get.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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