Difference between open() and window.open() - Javascript Browser Object Model

Javascript examples for Browser Object Model:Window open

Description

Difference between open() and window.open()

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   ww w.  ja  v a2 s.co  m*/
var test = function () {
    var open = function () {
      console.log('uh oh');
    };
    window.open('www.java2s.com');
    open('www.java2s.com');
};
test();
    });

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials