課程
/前端開發
/JavaScript
/JavaScript進階篇
<input type="button" value="添加一行" onclick="addRow()"/>
2015-01-28
源自:JavaScript進階篇 9-22
正在回答
<script>
var newnode = document.createElement("input");
newnode.setAttribute("type","button");
document.appendChild(newnode);
</script>
舉報
本課程從如何插入JS代碼開始,帶您進入網頁動態交互世界
1 回答【自動添加】點擊添加按鈕,能動態在最后添加一行
2 回答【自動添加2】點擊添加按鈕,能動態在最后添加一行
1 回答添加最后一行那個按鈕
1 回答第二步: 編寫一個函數,供添加按鈕調用,動態在表格的最后一行添加子節點;
1 回答添加按鈕,重新啟動setInterval
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2016-01-03
<script>
var newnode = document.createElement("input");
newnode.setAttribute("type","button");
document.appendChild(newnode);
</script>