var str='<INPUT type="file" name="File" size="50"> <input type=button name="lockPic" onclick="showPic()">'
document.getElementById('FileCollection').insertAdjacentHTML("beforeEnd",str);
这个onclick="showPic()"事件没有响应了,要怎么处理呀
------------------------------------------------------------------------
var file = document.createElement("INPUT");
file.type="file";
file.name="File";
file.size=50;
var btn = document.createElement("INPUT");
btn.type="button";
btn.name="lockPic";
btn.attachEvent("onclick",showPic);
document.getElementById('FileCollection').appendChild(file);
document.getElementById('FileCollection').appendChild(btn);
没有测试,意思是这样的,你自己调吧.
document.getElementById('FileCollection').insertAdjacentHTML("beforeEnd",str);
这个onclick="showPic()"事件没有响应了,要怎么处理呀
------------------------------------------------------------------------
var file = document.createElement("INPUT");
file.type="file";
file.name="File";
file.size=50;
var btn = document.createElement("INPUT");
btn.type="button";
btn.name="lockPic";
btn.attachEvent("onclick",showPic);
document.getElementById('FileCollection').appendChild(file);
document.getElementById('FileCollection').appendChild(btn);
没有测试,意思是这样的,你自己调吧.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货