问题:
I have a form with name orderproductForm
and an undefined number of inputs. 我有一个名称为orderproductForm
的表单,输入的数量不肯定。 ajax
I want to do some kind of jQuery.get or ajax or anything like that that would call a page through Ajax, and send along all the inputs of the form orderproductForm
. 我想作某种jQuery.get或ajax或相似的事情,它将经过Ajax调用页面,并发送全部形式为orderproductForm
的输入。 并发
I suppose one way would be to do something like 我想一种方法是作相似的事情 url
jQuery.get("myurl", {action : document.orderproductForm.action.value, cartproductid : document.orderproductForm.cartproductid.value, productid : document.orderproductForm.productid.value, ...
However I do not know exactly all the form inputs. 可是我不彻底知道全部的表格输入。 Is there a feature, function or something that would just send ALL the form inputs? 是否有仅发送全部表单输入的功能部件或功能? spa
解决方案:
参考一: https://stackoom.com/question/8Dwm/jQuery-AJAX提交表单参考二: https://oldbug.net/q/8Dwm/jQuery-AJAX-submit-form