Javascript examples for Browser Object Model:Window open
Changing file path when inserting HTML via JavaScript
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w w w . j av a 2 s .c o m*/ var output = document.getElementById("output"); output.innerHTML = '<button onclick="window.open(\'file:///C:/Users/yourname/Desktop/TEST/test.bat\')">Continue</button>' } </script> </head> <body> <div id="output"></div> </body> </html>