我做了通過(guò) jQuery 在 HTML 中添加行的實(shí)際過(guò)程,但它似乎不起作用。你能提供解決方案嗎?我怎么解決這個(gè)問(wèn)題?“添加行”按鈕不起作用,為什么?我嘗試了很多方法,但都失敗了。誰(shuí)能幫我?我也用 JavaScript 嘗試過(guò),但得到了相同的結(jié)果。$(document).ready(function() { $(".addRow").click(function() { $('table').append("<tr>" + "<td align=" center "><input type=" text " name=" id_country " value=" <?php echo $row["id_country"];?> "><br>" + "</td>" + "<td><input type=" text " name=" name " value=" <?php echo $row["name"];?> "><br>" + "</td>" + "<td><input type=" text " name=" codes " value=" <?php echo $row["codes"];?> "><br>" + "</td>" + "<td><input type=" text " name=" types " value=" <?php echo $row["types"];?> "><br>" + "</td>" + "<td><input type=" text " name=" t_code " value=" <?php echo $row["t_code"];?> "><br>" + "</td> "<td><input type=" text " name=" range_name " value=" <?php echo $row["range_name"];?> "><br>" + "</td> "<td align=" center "><input name=" usubmit " type=" submit " value=" Update " /></td>" + "<td align=" center "><input name=" dsubmit " type=" submit " value=" Delete " /></td>" + "</tr>" ); });}); </script><link rel="stylesheet" href="css/style.css" /><html><head> <meta charset="utf-8"> <title>View Records</title></head>
- 1 回答
- 0 關(guān)注
- 144 瀏覽
添加回答
舉報(bào)
0/150
提交
取消