rangevalidator

代碼:

<!DOCTYPE html>

<html>

<body>

 

<form runat="server">

Enter a date between 2005-01-01 and 2005-12-31:

<br>

<asp:TextBox id="tbox1" runat="server" />

<br><br>

<asp:Button Text="Submit" runat="server" />

<br><br>

<asp:RangeValidator

ControlToValidate="tbox1"

MinimumValue="2005-01-01"

MaximumValue="2005-12-31"

Type="Date"

EnableClientScript="false"

Text="The date must be between 2005-01-01 and 2005-12-31!"

runat="server" />

</form>

 

</body>

</html>

結(jié)果:

相關(guān)文章
亚洲国产精品第一区二区,久久免费视频77,99V久久综合狠狠综合久久,国产免费久久九九免费视频