Messages_cn.js <! -- Verify internationalization, Chinese --> (if messages_cn.js is not referenced, It is a prompt in English and Chinese is used)
Copy codeThe Code is as follows:
Required: "This field is required .",
Remote: "Please fix this field .",
Email: "Please enter a valid email address .",
Url: "Please enter a valid URL .",
Date: "Please enter a valid date .",
DateISO: "Please enter a valid date (ISO ).",
DateDE: "Bitte geben Sie ein gültiges Datum ein .",
Number: "Please enter a valid number .",
NumberDE: "Bitte geben Sie eine Nummer ein .",
Digits: "Please enter only digits ",
Creditcard: "Please enter a valid credit card number .",
Failed to: "Please enter the same value again .",
Accept: "Please enter a value with a valid extension
Maxlength: Please enter no more than {0} characters
Minlength: Please enter at least {0} characters
Rangelength: Please enter a value between {0} and {1} characters long.
Range: Please enter a value between {0} and {1 }.
Max: Please enter a value less than or equal to {0 }.
Min: Please enter a value greater than or equal to {0 }.
<Script type = "text/javascript">
$ (Function (){
$ ("# BtnOk"). click (function (){
$ ("# Form1"). validate ({rules :{
Username: {required: true, minlength: 2 },
Email: {required: true, email: true },
Url: {required: true, url: true },
Comment: "required"
}
});
});
});
</Script>
<Body>
<Form id = "form1" runat = "server" action = "" method = "get">
<Fieldset>
<Legend> A simple verification example with verification comments </legend>
<P>
<Label for = "cusername"> name </label> <em> * </em>
<Input type = "text" id = "cusername" name = "username" size = "25"/>
</P>
<P>
<Label for = "cemail"> email </label> <em> * </em>
<Input type = "text" id = "cemail" name = "email" size = "25"/>
</P>
<P>
<Label for = "curl"> URL </label> <em> * </em>
<Input type = "text" id = "curl" name = "url" size = "25"/>
</P>
<P>
<Label for = "ccomment"> your comment </label> <em> * </em>
<Textarea id = "ccomment" name = "comment" cols = "22"> </textarea>
</P>
<P>
<% -- <Input type = "submit" id = "send" value = "submit"/> -- %>
<Asp: Button ID = "btnOk" runat = "server" Text = "Submit" onclick = "btnOk_Click"/>
</P>
</Fieldset>
</Form>
</Body>