<script>
var fn = function(url){
// bla bla bla...
};
</script>
<input type="button" onclick="fn()" value="Execute">
<input type="button" onclick="???" value="Abort">
Just like above, when a user click on the “Execute” button, the fn()
function will be executed.
Suppose the fn()
function will run for a very very long time, and if the user want to stop the execution of this function midway, how should I do?