js终止程序

2020-04-29  本文已影响0人  BAT架构师

(一)在function里面

(1)return;

(2)return false;

(二)非function方法里面

alert("before error.");

throw SyntaxError();

alert("after error.");

(三)非function方法里面

 $("body").on("tap",".go-detail",function(e){

 e.preventDefault();

 e.stopPropagation();

}

上一篇 下一篇

猜你喜欢

热点阅读