[英]Is it possible to submit a form generated by Ajax?
我已經使用這個 function 在XMLHttpRequest()
的幫助下獲取一些數據
function fetchTab1(id) { var xhttp; xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("table_data_1").innerHTML = this.responseText; } }; xhttp.open("GET", "visit_fetch1.php?id=" + id, true); xhttp.send(); } var id = document.getElementById('member_uniq_id').value; fetchTab1(id);
如果我從響應文本中獲得的 html 數據包含 html 表單,我可以提交嗎?
所以我發現當我使用 td 時(因為將表單字段放在表格的列中)我在表單內標記它不起作用,但是當我刪除它們時,它開始起作用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.