标签: javascript return exit execution
如何阻止脚本继续执行?例如:
var a = $(".divclass"); if(a.length == 0){ //If div doesn't exist //stop execution, exit, break or whatever } ... ... ...
你可以看到我不在函数中,所以return会让我错误...
return