JavaScript Embedded in an HTML File : JavaScript in HTML : Development : JavaScript DHTML examples (example source code) Organized by topic

JavaScript DHTML
C++
PHP
JavaScript DHTML Home »  Development   » [  JavaScript in HTML  ]   
 



JavaScript Embedded in an HTML File

Please note that some example is only working under IE or Firefox.



<html>
<head>
    <title>Status Bar</title>
    <script type="text/javascript">
    <!--      window.defaultStatus = "Welcome to the large URL page."
   
      function changeStatus() {
        window.status = "Click me to go to the Unleashed home page."
     }
   
     function changeDefaultStatus() {
        window.defaultStatus = window.document.statusForm.messageList. 
                               options[window.document.statusForm.messageList. 
                               selectedIndex].text
     }
    //-->
    </script>
</head>
   
<body>
  <p>&#160;</p>
  <p>&#160;</p>
  <p align="center">
    <font size="7" color="#008040">
      <strong>http://www.samspublishing.com</strong>
    </font>
  </p>
  <p align="center">
    <a href="http://www.samspublishing.com" onmouseover="changeStatus();return true">Go...</a>
  </p>
  <p align=center>
    <font size="1">
      To change the default status bar message, select a message from the 
      list below and click the Change button. 
    </font>
  </p>
  <form name="statusForm" method="POST">
    <select name="messageList" size="1">
      <option selected>Welcome to the large URL page.</option>
      <option>On route to Sams Publishing</option>
      <option>This page intentionally left (nearlyblank.</option>
      <option>An exciting example of changing status bar text.</option>
    </select>    <input type="button" name="Change" value="Change"
       onclick="changeDefaultStatus()">
  </form>
</body>
</html>


           
       
Related examples in the same category
1.  HTML comment that hides the script.
2.  Using HTML Comments to Hide JavaScript Code
3.  Embedding JavaScript in HTML
4.  Inserting Source JavaScript Files
5.  Using the Head for Definitions
6.  A Basic JavaScript Starter Document
7.  JavaScript Template File
8.  Embedding a JavaScript Function
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.