Changing file path when inserting HTML via JavaScript - Javascript Browser Object Model

Javascript examples for Browser Object Model:Window open

Description

Changing file path when inserting HTML via JavaScript

Demo Code

ResultView the demo in separate window

<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>

Related Tutorials