How to make the html form truly submit
天才在左疯子在右
天才在左疯子在右 2018-12-12 20:36:14
0
2
1219

As a novice, this question may be a bit ridiculous, I hope you guys don’t laugh at it

I have a form written in form

How can I make the form content real when I click submit? Submit it (or save it)

instead of clicking the submit button and getting nothing! I didn’t understand it even after looking at other people’s source code

天才在左疯子在右
天才在左疯子在右

reply all(2)
手机用户695453102

One attribute of the form is action, which is the access address where you want to submit data to the background. In fact, it is the controller of tp5.

And there must be a button in the form, and the button type is submit.

You can also use ajax,

$.ajax({

url: "This is actually the same as the action in the form, which is the address you want to submit",

data:$("form").serialize()//Data submitted by the form

type: "POST",//Submission method

dateType : "json", method of interacting with the background

Success:function(res){

Successful callback function

}

});

華

This needs to interact with the background using ajax (ps: I don’t understand it very well)

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template