jQuery AJAX提交表單 - jQuery AJAX submit form

問題:

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
相關文章
相關標籤/搜索