Using the with Statement in JavaScript : With : Language Basics JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Language Basics » With »

 

Using the with Statement in JavaScript



<html>
<head>
  <title>JavaScript Unleashed</title>
</head>
<body>
  <script type="text/javascript">
  <!--
    with(document){
      write("Hello!");
      write("<br>The title of this document is, "" + title + "".");
      write("<br>The URL for this document is: " + URL);
      write("<br>Now you can avoid using the object's prefix each time!");
    }
  // -->
  </script>
</body>
</html>

           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Language Basics
» With