我的页面上有一个文件浏览器,使用
<input type="file" />
现在,单击浏览按钮,我需要显示一个JS“确认”弹出窗口。
仅单击该弹出窗口上的“确定”,我应该显示文件浏览器,否则应该取消(不显示文件浏览器/选择器窗口)
有可能实现这一目标吗?
最佳答案
$('input[type="file"]').click(function(){
return confirm("Are you sure you want to see me dance?");
});
Live DEMO