动态创建按钮的JavaScript代码
废话不多说了,直接给大家贴js代码了,具体代码如下所示: <!doctype html> <html> <head> <meta charset="UTF-8" /> <title>Document</title> [removed] var i = 0; function addInput(){ var o = document.createElement('input'); o.type = 'button'; o.value = '按钮'+ i++; if(o.attachEvent){ o.attachEvent('o
下载地址
用户评论