0
我寫了一個引導程序UI如本屏幕截圖:
Code is as shown here. 當用戶點擊接受新的訂單表按鈕,然後food 1
應移至accepted
表。我該怎麼做?我的代碼不起作用。
Javascript:
一個HTML(引導)表中的數據追加到另一個舉表
function append() {
// Code...
if (!('#btnOne').onclick) {
var htmlrows = "";
var htmltablestart = '<table class="table table-hover borderless">';
htmlrows = htmlrows + '<tr><td>' + foodOne + '</td><td class="pull-right"> <button type="button" class="btn btn-primary" onclick="appendComplete();" id="btnThree">Completed</button> </td><td></tr>';
var htmltableend = '</table>';
var htmlTable = htmltablestart + htmlrows + htmltableend;
('#acceptedOrdrDiv').append(htmlTable);
alert('you have accepted the order');
} else {
alert('you have not accepted the order');
}
}
function appendComplete() {
// Code...
if (!('#btnThree').onclick) {
var htmlrows = "";
var htmltablestart = '<table class="table table-hover borderless">';
htmlrows = htmlrows + '<tr><td>' + foodOne + '</td></tr>';
var htmltableend = '</table>';
var htmlTable = htmltablestart + htmlrows + htmltableend;
('#completedOrdrDiv').append(htmlTable);
alert('you have completed the order');
} else {
alert('you have not completed the order');
}
}
我也想接受的順序new order
表上Accept
按鈕點擊時被刪除。