<button onclick="save()">Save</button>
var btn = document.getElementByTagName("button");
btn.addEventListiner("click", save, false);
var worker = new Worker('my_task.js');
worker.onmessage = function(event) {
console.log("Worker said : " + event.data);
};
worker.postMessage('ali');
my_task.js :
postMessage("I'm working befor postMessage('ali').");
onmessage = function(event) {
postMessage('Hi '+event.data);
};
localStorage.setItem('key', 'value');
var val = localStorage.getItem('key');
<!--[if lt IE 9]>
<script src="@Url.Content("~/Scripts/ie/es5-shim.js")"></script>
<script src="@Url.Content("~/Scripts/ie/html5shiv.js")"></script>
<script src="@Url.Content("~/Scripts/ie/respond.js")"></script>
<![endif]-->