이 질문은 solving my last question 이후에 오는 것입니다. 숨겨진 양식에서 값을 얻고 싶습니다. 그러나 빈 문자열 만 가져 오려고하면 정보가 저장 될 때 정보를 저장하는 것으로 간주했지만 나중에 검색 할 수 있는지, 어떻게 검색 할 수 있는지 알고 싶습니다.숨겨 지거나 자동 생성되는 콘텐츠의 가치를 얻는 방법은 무엇입니까?
또한, 일부 자바 스크립트와 함께 즉석에서 생성 된 테이블이 있습니다 :
function createTable(){
if (document.getElementById("invoiceFormat").rowNumber.value != ""){
rows = document.getElementById("invoiceFormat").rowNumber.value;
}
var contents = "<table id='mt'><tr>";
if (document.getElementById("invoiceFormat").cb1[0].checked){
contents = contents + "<td class='htd'>Quantity</td>";
}if (document.getElementById("invoiceFormat").cb1[1].checked){
contents = contents + "<td class='htd'>Description</td>";
}if (document.getElementById("invoiceFormat").cb1[2].checked){
contents = contents + "<td class='htd'>Unitary Price</td>";
}if (document.getElementById("invoiceFormat").cb1[3].checked){
contents = contents + "<td class='htd'>Subtotal</td>";
}
for (i=4; i<=k; i++){
if (document.getElementById("invoiceFormat").cb1[i].checked){
contents = contents + "<td>" + document.getElementById("invoiceFormat").cb1[i].value + "</td>";
}
}
contents = contents + "</tr>";
for (j=1; j<=rows; j++){
contents = contents + "<tr>";
for (l=0; l<=k; l++){
if (document.getElementById("invoiceFormat").cb1[l].checked){
hotfix = l +1;
contents = contents + "<td> <input id='cell" + j + "_" + hotfix + "' name='cell' type='text' size='15' /> </td>";
}
}
contents = contents + "</tr>";
}
contents = contents + "</table>";
var createdTable = document.getElementById("mainTable");
createdTable.innerHTML = contents;
}
이 만들어지는 후에는 내가 지금까지 운없이 액세스하지만 시도했다, 난 그냥 얻을 수있는 사용자는 생성 된 입력 필드에 입력합니다. 어떻게해야합니까?
내가 jQuery를 함께 원시 자바 스크립트를 사용하고있어 도서관 유무에 관계없이 답변을 환영 있도록 :)