jquery往div里添加input
发布时间:2015-10-14, 17:48:40 分类:HTML | 编辑 off 网址 | 辅助
正文 327字数 168,917阅读
<input type="button" onclick="addButton()" value="点击添加"/>
<div id="div"></div>
Run code
Cut to clipboard
js中:
function addButton(){
var button="<input type='button' value='按钮'/>";
$("#div").append(button);
}
Run code
Cut to clipboard
(支付宝)给作者钱财以资鼓励 (微信)→
暂无评论 »