【发布时间】:2014-03-31 08:41:48
【问题描述】:
如何将日期计时器绑定到文本框
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Click-2-Call.aspx.cs" Inherits="Click_2_Call" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Click2Call</title>
<script type="text/javascript" src="JS/jquery-ui.js"></script>
<script type="text/javascript" src="JS/jquery-ui.min.js"></script>
<script type="text/javascript" src="JS/jquery-1.7.min.js"></script>
<script type="text/javascript" src="JS/jquery-ui-timepicker-addon.js"></script>
<style type="text/css">
.numbers
{
width: 50px;
text-align: center;
font-family: Arial;
font-size: 24px;
font-weight: bold; /* options are normal, bold, bolder, lighter */
font-style: normal; /* options are normal or italic */
color: #3d3d3d; /* change color using the hexadecimal color codes for HTML */
}
.title
{
width: 50px;
text-align: center;
font-family: arial;
font-size: 10px;
font-weight: bold; /* options are normal, bold, bolder, lighter */
color: #3d3d3d; /* change color using the hexadecimal color codes for HTML */
}
.numbers1
{
width: 50px;
text-align: center;
font-family: Arial;
font-size: 22px;
font-weight: bold; /* options are normal, bold, bolder, lighter */
font-style: normal; /* options are normal or italic */
color: #999; /* change color using the hexadecimal color codes for HTML */
}
.style2
{
height: 28px;
border: 2px solid green;
}
.style19
{
width: 70px;
height: 12px;
}
.style24
{
width: 70px;
height: 32px;
}
.style37
{
width: 221px;
height: 32px;
}
.style38
{
width: 221px;
height: 12px;
}
.style42
{
width: 70px;
height: 11px;
}
.style43
{
width: 221px;
height: 11px;
}
.style47
{
height: 10px;
}
.style48
{
width: 221px;
height: 10px;
}
.Border
{
width: 313px;
margin-top: 0px;
height: 320px;
margin-right: 14px;
border: 2px solid green;
background: url(Image/backgroundimage1.jpg) no-repeat;
background-size: 440px;
}
.style49
{
height: 10px;
width: 70px;
}
</style>
</head>
<body onload="countdown(yr, m, d, hr, min)">
<form id="form1" runat="server">
<div class="Border">
<table style="width: 313px; margin-top: 0px; height: 320px; margin-right: 14px;">
<tr>
<td class="style2" colspan="2">
<asp:Label ID="lblClick2Call" runat="server" Text="Click2Call" Font-Bold="True" Font-Size="Larger"></asp:Label>
<img alt="Imga" src="Image/smart.jpg" width="25px" height="25px" style="float: right" />
</td>
</tr>
<tr>
<td class="style24">
<asp:Label ID="lblName" runat="server" Text="Name :" Font-Names="Tahoma" Font-Bold="True"
Font-Size="8.25pt"></asp:Label>
</td>
<td class="style37">
<asp:TextBox ID="txtName" runat="server" Height="22px" Width="205px" MaxLength="500"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style19">
<asp:Label ID="lblNumber" runat="server" Text="Number :" Font-Names="Tahoma" Font-Bold="True"
Font-Size="8.25pt"></asp:Label>
</td>
<td class="style38">
<asp:TextBox ID="txtNumber" runat="server" Height="22px" Width="205px" MaxLength="500"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvNumber" runat="server" ControlToValidate="txtNumber"
ErrorMessage="*" ToolTip="Please Enter the Number" ValidationGroup="vgCallMe"
ForeColor="Red" SetFocusOnError="True"></asp:RequiredFieldValidator>
<asp:CustomValidator ID="cvNumber" runat="server" ControlToValidate="txtNumber" OnServerValidate="TextValidate"
ErrorMessage="*" ToolTip="Please Enter Only Digit or Numberic value or Atleast 10 digit"
ValidationGroup="vgCallMe" ForeColor="Red" SetFocusOnError="True"></asp:CustomValidator>
</td>
</tr>
<tr>
<td class="style19">
<asp:Label ID="lblEmail" runat="server" Text="Email :" Font-Names="Tahoma" Font-Bold="True"
Font-Size="8.25pt"></asp:Label>
</td>
<td class="style38">
<asp:TextBox ID="txtEmail" runat="server" Height="22px" Width="205px" MaxLength="500"></asp:TextBox>
<asp:CustomValidator ID="cvEmail" runat="server" ControlToValidate="txtEmail" OnServerValidate="EmailValidate"
ErrorMessage="*" ToolTip="Please Enter Valid Email Id..." ValidationGroup="vgCallMe"
ForeColor="Red" SetFocusOnError="True"></asp:CustomValidator>
</td>
</tr>
<tr>
<td class="style19">
<asp:Label ID="lblLocation" runat="server" Text="Location :" Font-Names="Tahoma"
Font-Bold="True" Font-Size="8.25pt"></asp:Label>
</td>
<td class="style38">
<asp:TextBox ID="txtLocation" runat="server" Height="22px" Width="205px" MaxLength="500"
Font-Names="Tahoma"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style19">
<asp:Label ID="lblLanguage" runat="server" Text="Language :" Font-Names="Tahoma"
Font-Bold="True" Font-Size="8.25pt"></asp:Label>
</td>
<td class="style38">
<asp:DropDownList ID="ddlLanguage" runat="server" Height="23px" Width="207px" AutoPostBack="false"
Font-Names="Tahoma" Font-Size="8.25pt">
<asp:ListItem Selected="True" Value="1">English</asp:ListItem>
<asp:ListItem Value="2">Hindi</asp:ListItem>
<asp:ListItem Value="3">Marathi</asp:ListItem>
<asp:ListItem Value="4">Punjabi</asp:ListItem>
<asp:ListItem Value="5">Gujrati</asp:ListItem>
<asp:ListItem Value="6">Bengali</asp:ListItem>
<asp:ListItem Value="7">telgu</asp:ListItem>
<asp:ListItem Value="8">kanada</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="style42">
<asp:Label ID="lblTime" runat="server" Text="Time :" Font-Names="Tahoma" Font-Bold="True"
Font-Size="8.25pt"></asp:Label>
</td>
<td class="style43">
<asp:TextBox ID="txtTime" runat="server" Height="22px" Width="205px" MaxLength="500"
Font-Names="Tahoma"></asp:TextBox>
</td>
</tr>
<tr`enter code here`>
<td class="style49">
</td>
<td class="style48">
<asp:Button ID="btnCallMe" runat="server" Text="Call Me" Width="81px" ValidationGroup="vgCallMe"
OnClick="btnCallMe_Click" />
<asp:Button ID="btnClear" runat="server" Text="Clear" Width="90px" OnClick="btnClear_Click" />
</td>
</tr>
<tr>
<td class="style47" colspan="2">
<asp:Label ID="lblcopyRight" Text="©2014@SmartConnect Technologies Pvt. Ltd." runat="server"></asp:Label>
</td>
</tr>
</table>
</div>
<div style="width: 295px">
<asp:Label ID="lblDisplayMessage" runat="server" Text="Label" Font-Bold="True" Visible="False"></asp:Label>
</div>
</form>
<script type="text/javascript">
$(document).ready(function() {
$("#txtTime").datetimepicker();
});
</script>
</body>
</html>
【问题讨论】:
-
嗨,请帮助它不工作
标签: jquery