No correct solution
The closest you're gonna get is web workers (only in FF 3.5 / HTML5). Check it out - http://www.whatwg.org/specs/web-workers/current-work/
However, what we can do is simulate multi-threading. Please go through this article also.
Here below it loads 500 of them.
The browser unfortunately only gives you a strict set of features of the language.
You can use Web Workers to create background threads
Firefox (Gecko): 3.5
Internet Explorer: 10.0
Safari (WebKit): 4