upHTML= ''' <!DOCTYPE html> function update(){ // Get all the rows of the table var rows = document.getElementById("tb1").rows; var r= "0" var c= "1" var col = rows[r].cells; // Target row with the target col (target cell) changed with the new value col[c].innerHTML = "New Value"; } </script> ''' return upHTML 按钮可见,但单击后立即开始詹金斯的作业。
upHTML= ''' <!DOCTYPE html> function update(){ // Get all the rows of the table var rows = document.getElementById("tb1").rows; var r= "0" var c= "1" var col = rows[r].cells; // Target row with the target col (target cell) changed with the new value col[c].innerHTML = "New Value"; } </script> ''' return upHTML
https://ddeveloper.mozilla.org/en-us/docs/web/html/element/element/button
<button type="button" class="button" onclick="update()">Update</button>
您如何设法制作按钮?我尝试做同样的事情,但最终事实证明是文本“ update1”等。
https://i.sstatic.net/2frjwtzm.png