<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="jQueryValidation.Default" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script src="Scripts/jquery-1.6.1.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
function checkValidity() {
var container = document.getElementById("toggle");
alert("uspeh!");
var inputArray = container.getElementsByTagName("input");
}
</script>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div id="toggle">
<asp:Label ID="lblName" runat="server" Text="Vnesi ime: "></asp:Label>
<span><asp:TextBox ID="txtName" runat="server" data-errormessage="Внесете име" data-class="required"></asp:TextBox></span>
<br />
<asp:Label ID="lblSurname" runat="server" Text="Vnesi prezime: "></asp:Label>
<span><asp:TextBox ID="txtSurname" runat="server" data-errormessage="Внесете презиме" data-class="required"></asp:TextBox></span>
<br />
<asp:Label ID="lblNickname" runat="server" Text="Vnesi nadimak: "></asp:Label>
<span><asp:TextBox ID="txtNickname" runat="server" data-errormessage="Внесете надимак" data-class="required"></asp:TextBox></span>
<br /><br />
<asp:Button ID="btnSend" runat="server" Text="Send"
OnClientClick="checkValidity(); return false;" onclick="btnSend_Click" />
</div>
</form>
</body>
</html>
更新しました。
ポップアップが表示されない理由がわかりません。何か案が?前もって感謝します!