表单验证(ASP.NET+jquery.validationEngine.js)

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>MyKit</title>
<link href="css/Style.css" rel="stylesheet" type="text/css" />
<link href="css/validationEngine.jquery.css" rel="stylesheet" />
<script src="js/jquery-2.1.0.js"></script>
<script src="js/jquery.validationEngine-zh_CN.js"></script>
<script src="js/jquery.validationEngine.min.js"></script>
<script type="text/javascript">
//表单验证
$(document).ready(function () {
$("#form1").validationEngine();
});

</script>
</head>
<body class="l_main">
<form id="form1" runat="server">
<div class="l_border">
<asp:Label ID="lbl_uname" runat="server" Text="用户名:"></asp:Label>
<asp:TextBox ID="txt_uname" runat="server" ToolTip="请输入用户名!" Width="180px" class="validate[required] text-input"></asp:TextBox>
<br />
<asp:Label ID="lbl_pwd" runat="server" Text="密码:"></asp:Label>
<asp:TextBox ID="txt_pwd" runat="server" ToolTip="请输入密码!" TextMode="Password" Width="180px" class="validate[required] text-input"></asp:TextBox>
<br />
<span></span>
<asp:Button ID="Button1" runat="server" Text="登录" Width="185px" OnClick="btn_login_Click"/>
</div>
</form>
</body>
</html>

表单验证(ASP.NET+jquery.validationEngine.js),古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。