js终止程序执行的方法共有三种

(一)在function里面(普通js方法)
 (1)return;
 (2)return false;(二)非function方法里面(如ajax方法)
 alert(“发生异常”);
 throw SyntaxError();
 alert(“不会输出”);(三)非function方法里面
 $(“body”).on(“tap”,".go-detail",function(e){
  
 e.preventDefault();
  
 e.stopPropagation();
 }