我做了通过 jQuery 在 HTML 中添加行的实际过程,但它似乎不起作用。你能提供解决方案吗?我怎么解决这个问题?“添加行”按钮不起作用,为什么?我尝试了很多方法,但都失败了。谁能帮我?我也用 JavaScript 尝试过,但得到了相同的结果。$(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 回答
- 1 回答
- 0 关注
- 132 浏览
添加回答
举报
0/150
提交
取消