Tuesday, 2024-03-19, 10:28 AM
Welcome Guest | RSS
Site menu
Tag Board
500
Our poll
How do you rate .Net classes ?
Total of answers: 207
Statistics

Total online: 1
Guests: 1
Users: 0
31-12-2010

Eg: To display the date & time of a web page last access:


document.lastmodified: It is a member property of document object, it will return web page last accessed date & time.
    <html>
      <body>
         <script type = "text/javscript">
         document.write("The page last updated on " +document.lastmodified)
         </script>
       </body>
    </html>
Output: The page last modified on 12/31/2010 18:31:25

Eg: For radio button control:
Requirement:

    <html>
       <head>
           <script type = "text/javascript">
           function check(browsername)
           {
              document.getElementById("mytextbox").value = browsername
            }
           </script>
        </head>
        <body>
            <input type = "radio" value "Internet Explorer" onclick= check(this.value)/> Internet Explorer <br>
            <input type = "radio" value "Mozilla" onclick= check(this.value)/> Mozilla <br>
            <input type = "radio" value "Opera" onclick= check(this.value)/> Opera <br>
            <input type = "radio" value "Netscape" onclick= check(this.value)/> Netscape <br>

            Your favourite web browser name is <input type = "text" Id = "mytextbox" size = 20/>
        </body>
    </html>

Eg: To convert box text into upper case & lower case on user demand:

Requirement:

    <html>
      <head>
        <script type = "text/javascript">
        function uppercase()
        {
         document.getElementById("Fname").value = document.getElementById("Fname").toUpperCase()
         document.getElementById("Lname").value = document.getElementById("Lname").toUpperCase()
        }

        function lowercase()
        {
         document.getElementById("Fname").value = document.getElementById("Fname").toLowerCase()
         document.getElementById("Lname").value = document.getElementById("Lname").toLowerCase()
        }

      <body>
        First Name <input type = "text" Id = "Fname" size = 20/>
        Last Name <input type = "text" Id = "Lname" size = 20/>
        <br>
        <br>
        <input type = "button" value = "Upper Case" onclick= "uppercase()"/>
        <input type = "button" value = "Lower Case" onclick= "lowercase()"/>
      </body>
    </html>

Search

Time
 

 

Calendar
 
«  March 2024  »
SuMoTuWeThFrSa
     12
3456789
10111213141516
17181920212223
24252627282930
31

Twitter
 

Entries archive

Copyright R N Reddy © 2024Developed by Nagendra, Venkat, Vijaya and Yaswanth
Get free updates as SMS to your mobile. Just register by clicking here