Javascript examples for DOM HTML Element:Anchor
Store domain in local storage and call it in href
<html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <title>Ripping Status</title> <script type="text/javascript"> domain = localStorage['domain'] || ''; function init() {/*ww w.j a v a 2 s . co m*/ window.location=domain+'/'; document.getElementById( 'box' ); }; </script> </head> <body onload="init();"> <div id="box"></div> </body> </html>