Html actually is multithread.
Let's talk about onclick and setTimeout in html code and javascript.
The function invoked by onclick of form button and setTimeout of javascript all start a new thread to do jobs. If you run command "document.write(SOMETHING)" in the function invoked by above two ways, the SOMETHING will flush your current page, then use SOMETHING to rewrite the page. Namely, this "document" are not the original "document".
More details are on:
http://www.howtocreate.co.uk/tutorials/javascript/writing
Let's talk about onclick and setTimeout in html code and javascript.
The function invoked by onclick of form button and setTimeout of javascript all start a new thread to do jobs. If you run command "document.write(SOMETHING)" in the function invoked by above two ways, the SOMETHING will flush your current page, then use SOMETHING to rewrite the page. Namely, this "document" are not the original "document".
More details are on:
http://www.howtocreate.co.uk/tutorials/javascript/writing
No comments:
Post a Comment