Home  >  Article  >  Web Front-end  >  How to implement JS termination execution

How to implement JS termination execution

高洛峰
高洛峰Original
2016-12-05 14:22:581189browse

(1) In function

(1) return;
(2) return false;

(2) In non-function method

alert("before error.");
throw SyntaxError();
alert( "after error.");

The above is the entire implementation method of JS termination execution brought to you by the editor


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn