In the Web page to implement a date control like VB components, a click on the pop-up Calendar menu .... Original )
Source: Internet
Author: User
In the Web page to implement a date control like VB components, a click on the pop-up Calendar menu .... Original )
Author: Small white Click link View author details
<HTML>
<HEAD>
<meta name= "generator" content= "Microsoft Visual Studio 6.0" >
<TITLE> demo Effect of calling control selection time directly on a Web page
</TITLE>
<script language=javascript>
<!--
On the www.asph.net to see a netizen question:
In the ASP through form input date time is more troublesome, but also easy to input errors,
Do you have a date control like VB (I forgot to be named) such a component,
The Calendar menu pops up at a click, so you don't get it wrong.
Small white flowers a little time to grope for a moment, finally realized the function,
Oh, now take out and share with everyone:
The code is as follows:
Test pass: Win2ks
//***************************
Hide Date Controls First
function Hide () {
Showcalendar.style.display= "None"
}
X=window.settimeout ("Hide ()", 1)
-->
</SCRIPT>
<script language=vbscript>
<!--
' Click to display date control
function Button1_onclick ()
showcalendar.style.display= "inline"
If Text1.value <> "" Then
Calendar1.value=text1.value
End If
End Function
function Calendar1_click ()
' When the date is selected, display the value to the text box
' The following is the format of the selection time
' Text1.value =formatdatetime (calendar1.value,0)
Text1.value =formatdatetime (calendar1.value,1)
' Text1.value =formatdatetime (calendar1.value,2)
Showcalendar.style.display= "None"
End Function
-->
</SCRIPT>
<script Language=vbscript for=calendar1 event=click>
<!--
Calendar1_click ()
-->
</SCRIPT>
</HEAD>
<BODY>
Demo effect of calling control selection time directly on a Web page
<br>
Note: Make sure the Calendaractivex control is already installed on the local machine
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.