|
|
|
อยากทราบการใส่เลขลำดับ ใน javascript ค่ะ ยากใส่ number ลงใน //*** Remark 9 ***// ทำไงค่ะ เช่น ถ้าเรากดเพิ่มแถว 2 แถว ก้อให้ ขึ้นเลขลำดับด้วยค่ะ**** |
|
|
|
|
|
|
|
****อยากใส่ number ลงใน //*** Remark 9 ***// ทำไงค่ะ เช่น ถ้าเรากดเพิ่มแถว 2 แถว ก้อให้ ขึ้นเลขลำดับด้วยค่ะ****
function CreateNewRow()
{
var intLine = parseInt(document.frmInsert.hdnMaxLine.value);
intLine++;
var theTable = document.all.tbExp
var newRow = theTable.insertRow(theTable.rows.length)
newRow.id = newRow.uniqueID
var item1 = 1
var newCell
//*** Line No 1 ***//
newCell = newRow.insertCell(0)
newCell.id = newCell.uniqueID
newCell.setAttribute("className", "css-name");
newCell.innerHTML = "<INPUT TYPE=\"TEXT\" SIZE=\"10\" NAME=\"order_line_no[]"+intLine+"\" VALUE=\"\">"
//*** Del No 2 ***//
newCell = newRow.insertCell(1)
newCell.id = newCell.uniqueID
newCell.setAttribute("className", "css-name");
newCell.innerHTML = "<INPUT TYPE=\"TEXT\" SIZE=\"10\" NAME=\"order_del_no[]"+intLine+"\" VALUE=\"\">"
//*** ISBN 3 ***//
newCell = newRow.insertCell(2)
newCell.id = newCell.uniqueID
newCell.setAttribute("className", "css-name");
newCell.innerHTML = "<INPUT TYPE=\"TEXT\" SIZE=\"15\" NAME=\"sn_ISBN[]"+intLine+"\" VALUE=\"\">"
//*** Part Name 4 ***//
newCell = newRow.insertCell(3)
newCell.id = newCell.uniqueID
newCell.setAttribute("className", "css-name");
newCell.innerHTML = "<INPUT TYPE=\"TEXT\" SIZE=\"15\" NAME=\"sn_name[]"+intLine+"\" VALUE=\"\">"
//*** Quantity 5 ***//
newCell = newRow.insertCell(4)
newCell.id = newCell.uniqueID
newCell.setAttribute("className", "css-name");
newCell.innerHTML = "<INPUT TYPE=\"TEXT\" SIZE=\"15\" NAME=\"order_qty[]"+intLine+"\" VALUE=\"\">"
//*** RTBS Date 6 ***//
newCell = newRow.insertCell(5)
newCell.id = newCell.uniqueID
newCell.setAttribute("className", "css-name");
newCell.innerHTML = "<INPUT TYPE=\"TEXT\" SIZE=\"15\" NAME=\"order_line_duedate[]"+intLine+"\" VALUE=\"<?=$order_duedate;?>\" >"
//*** U/M 7 ***//
newCell = newRow.insertCell(6)
newCell.id = newCell.uniqueID
newCell.setAttribute("className", "css-name");
newCell.innerHTML = "<INPUT TYPE=\"TEXT\" SIZE=\"5\" NAME=\"order_unit[]"+intLine+"\" VALUE=\"pcs.\">"
//*** Remark 8 ***//
newCell = newRow.insertCell(7)
newCell.id = newCell.uniqueID
newCell.setAttribute("className", "css-name");
newCell.innerHTML = "<INPUT TYPE=\"TEXT\" SIZE=\"20\" NAME=\"order_line_remark[]"+intLine+"\" VALUE=\"\">"
//*** Remark 9 ***//
newCell = newRow.insertCell(8)
newCell.id = newCell.uniqueID
newCell.setAttribute("className", "css-name");
newCell.innerHTML = "<INPUT TYPE=\"TEXT\" SIZE=\"20\" NAME=\"order_line_remark[]"+intLine+"\" VALUE=\"\">"
document.frmInsert.hdnMaxLine.value = intLine;
}
Tag : PHP, MySQL
|
|
|
|
|
|
Date :
2012-01-12 10:34:46 |
By :
ลูกอ๊อด |
View :
838 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ได้แล้วค่ะ
//*** Remark 9 ***//
newCell = newRow.insertCell(8)
newCell.id = newCell.uniqueID
newCell.setAttribute("className", "css-name");
newCell.innerHTML = "<INPUT TYPE=\"TEXT\" SIZE=\"20\" NAME=\"order_line_remark[]"+intLine+"\" VALUE="+intLine+">"
|
|
|
|
|
Date :
2012-01-12 11:20:26 |
By :
ลูกอ๊อด |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|