<script language="javascript"> function CreateNewRow() { var intLine = parseInt(document.frmMain.hdnMaxLine.value); intLine++; var theTable = document.all.tbExp var newRow = theTable.insertRow(theTable.rows.length) newRow.id = newRow.uniqueID var item1 = 1 var newCell //*** Column 1 ***// newCell = newRow.insertCell(0) newCell.id = newCell.uniqueID newCell.setAttribute("className", "css-name"); newCell.innerHTML = "<center><INPUT TYPE=\"TEXT\" NAME=\"Column1_"+intLine+"\" VALUE=\"\"></center>" //*** Column 2 ***// newCell = newRow.insertCell(1) newCell.id = newCell.uniqueID newCell.setAttribute("className", "css-name"); newCell.innerHTML = "<center><INPUT TYPE=\"TEXT\" NAME=\"Column2_"+intLine+"\" VALUE=\"\"></center>" //*** Column 3 ***// newCell = newRow.insertCell(2) newCell.id = newCell.uniqueID newCell.setAttribute("className", "css-name"); newCell.innerHTML = "<center><INPUT TYPE=\"TEXT\" NAME=\"Column3_"+intLine+"\" VALUE=\"\"></center>" //*** Column 4 ***// newCell = newRow.insertCell(3) newCell.id = newCell.uniqueID newCell.setAttribute("className", "css-name"); newCell.innerHTML = "<center><INPUT TYPE=\"TEXT\" NAME=\"Column4_"+intLine+"\" VALUE=\"\"></center>" //*** Column 5 ***// newCell = newRow.insertCell(4) newCell.id = newCell.uniqueID newCell.setAttribute("className", "css-name"); newCell.innerHTML = "<center><INPUT TYPE=\"TEXT\" NAME=\"Column5_"+intLine+"\" VALUE=\"\"></center>" //*** Column 6 ***// newCell = newRow.insertCell(5) newCell.id = newCell.uniqueID newCell.setAttribute("className", "css-name"); newCell.innerHTML = "<center><INPUT TYPE=\"TEXT\" NAME=\"Column6_"+intLine+"\" VALUE=\"\"></center>" document.frmMain.hdnMaxLine.value = intLine; } function RemoveRow() { intLine = parseInt(document.frmMain.hdnMaxLine.value); if(parseInt(intLine) > 0) { theTable = (document.all) ? document.all.tbExp : document.getElementById("tbExp") theTableBody = theTable.tBodies[0]; theTableBody.deleteRow(intLine); intLine--; document.frmMain.hdnMaxLine.value = intLine; } } </script> <form name="frmMain" method="post"> <table class="table" id="tbExp" width="100%"> <thead> <tr> <body OnLoad="CreateNewRow();"> <th><div align="center"></div>ResourceName</th> <th><div align="center"></div>RoleName</th> <th><div align="center"></div>ResourceCategory</th> <th><div align="center"></div>ResourceEmail</th> <th><div align="center"></div>ResourceTelNo</th> <th><div align="center"></div>ResourceDeparment</th> </tr> </thead> </table> <input type="hidden" name="hdnMaxLine" value="0"> <input name="btnAdd" type="button" id="btnAdd" value="+" onClick="CreateNewRow();"> <input name="btnDel" type="button" id="btnDel" value="-" onClick="RemoveRow();"> </form>
<table class="table" id="tbExp" width="100%"> <thead> <tr> <body OnLoad="CreateNewRow();"> <th><div align="center"></div>ResourceName</th> <th><div align="center"></div>RoleName</th> <th><div align="center"></div>ResourceCategory</th> <th><div align="center"></div>ResourceEmail</th> <th><div align="center"></div>ResourceTelNo</th> <th><div align="center"></div>ResourceDeparment</th> </tr> </thead> </table>
<?php for($i=1;$i<=(int)$_POST["hdnMaxLine"];$i++) { echo $_POST["txtCustomerID_".$i]; echo "<br>"; echo $_POST["txtName_".$i]; echo "<br>"; echo $_POST["txtEmail_".$i]; echo "<br>"; echo $_POST["txtCountryCode_".$i]; echo "<br>"; echo $_POST["txtBudget_".$i]; echo "<br>"; echo $_POST["txtUsed_".$i]; echo "<hr>"; } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง