if (e.stopPropagation) {e.stopPropagation();}
问题1:function doSubmit(e),里边为什么加个 e,表达什么含义
问题2:if (e.stopPropagation) {e.stopPropagation();} e.stopPropagation出现2次,什么意思
问题3:我百度下,下边2个都是阻止事件的扩散,为什么这么做?
if (e.stopPropagation) {e.stopPropagation();}
e.cancelBubble = true;
function doSubmit(e) { if (formChecker != null) { clearInterval(formChecker); formChecker = null;} //清除定时器 e = e || window.event; if (e.stopPropagation) {e.stopPropagation();} e.cancelBubble = true; try { $("input[type='submit']").attr("disabled", "disabled"); swfu.startUpload(); //上传队列中第一个文件 } catch (ex) { $("input[type='submit']").removeAttr("disabled"); this.debug(ex); } return false;}