CNode
L

lb1104

注册于 13 年前

积分 100
lb1104 参与的话题
在话题中回复 · 13 年前
为什么我的click()事件不能用,坐等,谢谢! &lt;head&gt; [removed] var i=0; function test1(){ alert&#40;"hello"&#41;; i++; var f=document.getElementById("files1"); if(f!=null){ f.disabled=true; } alert&#40;i&#41;; if(i==3){ var f=document.getElementById("files1"); f.disabled=false; f.id="ss"; alert&#40;"what"&#41;; f.click();//为什么这里没有执行 alert&#40;"why"&#41;; } } &lt;/head&gt; &lt;body&gt; <div id="filedt" onclick="test1()"> &lt;input type="file" name="file" id="files1"/&gt; </div> &lt;/body&gt; &lt;/html&gt;