Not the most elegant solutions, but you can wrap your script inside a labeled block:
Code:
MY_SCRIPT: {
document.write("<p>testing 1");
break MY_SCRIPT;
document.write("<p>testing 2");
} // MY_SCRIPT label
Or you can use try...catch and throw an exception:
Code:
try {
document.write("<p>testing 1");
throw("brokeout");
document.write("<p>testing 2");
} catch (err) {
document.write("<p>err = " + err);
}