[英]jquery form submission canceled
am using dynamic form submission using jquery when form is submitted the error shown 我在提交表单时使用jquery使用动态表单提交显示错误
"Form submission canceled because the form is not connected" “由于未连接表单而取消了表单提交”
$('<form method="POST" action="http://localhost/almadar/appointment-form">
<input type="hidden" name="dept" value="'+dept+'">
<input type="hidden" name="doctor" value="'+doctor+'">
<input type="hidden" name="hours" value="'+hours+'">'
).submit();
Insert the form in the dom, then submit: 将表格插入dom,然后提交:
var $form = $('<form method="POST" action="http://localhost/almadar/appointment-form"><input type="hidden" name="dept" value="'+dept+'"><input type="hidden" name="doctor" value="'+doctor+'"><input type="hidden" name="hours" value="'+hours+'">')
.appendTo('body')
$form.submit()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.