I have a small form I'd like to validate with AJAX. (I'm using jQuery)
I'd like to pass the data entered in the inputs by the user (POST method) and some other data that is typically available in my controller/view.
How can I do that?
Thanks
GET 数据进入 URL
/controller/action?name=will&last_name=smith
POST 数据在请求正文中以多种方式传输,包括 form-data、xml、json 等
也许您应该尝试使用您的请求正文数据发布第一个 url
只需在 URL 中包含 GET-data,例如 http://www.example.com?param=value
其余使用 POST
您可以将要发送的数据包含在隐藏的表单字段中,在控制器上处理发布请求,然后重定向以获取