• Nike free run 2 pink
  • Nike free 5.0 kids
  • Oakley sunglasses discount
  • CodeAve.com CodeAve.com - JavaScript - Forms
    ASP
    JavaScript
    ·Document Info
    ·Forms
    ·Images
    ·Miscellaneous
    ·Navigation
    ·Script Writers
    ·Contents
    ·What's New?
    CSS
    HTML
    Maps
    Links
    Mail List
    Search
    Sitemap


     

  • Retro 3 jordans
  • Jordan 13 retro
  • Nike free 5.0

  • Current Date Form
  • Air jordan 11 low
  • New Balance 996
  • Ray ban vintage sunglasses
  • When producing date forms itís best to have the form pre-filled to a realistic value like the current date. But, what exactly is the current date? The current date on your server is likely to vary widely from the date of people utilizing your sire. The following example will output a form set to the current date on the client rather than the server. Also the month, date and year are in the proper chronological order with the current date elements as the selected option for easiest navigation.
    View the Output
    Text View
    Print View
    Mail this Link
    Download the Code

    <html>
    <title>Codeave.com(Current Date Form)</title>
    <body bgcolor="#FFFFFF">
    <center>
    <script language="JavaScript">
    <!--
    // Create a variable to contain the local date
    var right_now=new Date();

    // create an array for the month name
    var month_name = new Array (
    "January",
    "February",
    "March",
    "April",
    "May",
    "June",
    "July",
    "August",
    "September",
    "October",
    "November",
    "December");

    // Write the form action
    document.write("<form action=http://www.codeave.com/html/get.asp>")

    // Begin selection option for month
    document.write("<select name=the_month>")

    // Loop to create options for month with current month selected
    for (counter = 1; counter < 12; counter++)
    {
    var mth_select="";

    // If the counter = the current month then
    // change the variable mth_select from null to selected
    if (counter == right_now.getMonth())
    {
    var mth_select="selected "
    }

    // Write out the options for month
    document.write ("<option " + mth_select + "value=" + counter +">" + month_name[counter] + "</option>");
    }
    document.write("</select>");

    // Begin selection option for day
    document.write("<select name=the_day>")

    // Loop to create options for date with current date selected
    for (counter = 1; counter < 31; counter++)
    {
    var select="";
    if (counter == right_now.getDate())
    {
    var select="selected "
    }
    // Write out the options for date
    document.write ("<option " + select + "value=" + counter +">" + counter + "</option>");
    }
    document.write("</select>");


    // Begin selection option for year
    document.write("<select name=the_year>")
    // Loop to create options for year with current year selected
    for (counter = right_now.getYear()-2; counter < right_now.getYear()+3; counter++)
    {

    // If the counter = the current month then
    // change the variable date_select from null to selected
    var date_select="";
    if (counter == right_now.getYear())
    {
    var date_select="selected "
    }
    // Write out the options for year
    document.write ("<option " + date_select + "value=" + counter +">" + counter + "</option>");
    }
    document.write("</select>");

    // Write a submit button and close the form
    document.write("<input type=submit value=Submit></form>");
    -->
    </script>

    </center>

    </body>
    </html>

     

     

     



    ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
    Server Variables | Response Objects | Random Events | Miscellaneous
    HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
    JavaScript: Document Info | Forms | Images | Navigation | Script Writers
    CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement

    CodeAve.com is hosted by MyHosting.com
    Donate Food Online with a Mouse Click at TheHungerSite.com
    Donate Land Online with a Mouse Click at TheRainForestSite.com
    © 1999 - 2017 CodeAve.com
    All Rights Reserved

    jordan 11 gamma Nike KD VI lebron 11 low