Query Formvalidator plug-ins are very useful, but there is a serious bug, in the use of AJAX verification, if the contents of the input box already exists, put the mouse into the input box, do not make any changes to leave, it will prompt the error,
Another form of the linkage box, the right-hand side of the linkage is generated with jquery
This is modeled on the JS method of the article modified
First look at the page code:
Copy Code code as follows:
Area:
Do not want to use the style of Easyui, but want his form function, originally was to go to the Internet to find relevant plug-ins, but did not find it began to write their own, did not think so simple.
Background code: (This is not important)
Let's first enumerate AJAX implementations in jquery and prototype.
Jquery:
Copy Code code as follows:
Prototype
Copy Code code as follows:
The actual introduction of the SetInterval function after
There is a requirement in the project to load the data using AJAX to return the page and assign the value, and then the front end to remove the value
This involves the sequence of code issues, sometimes the background has not returned data, but has
JS to cross the domain, you can use:
is able to read data from other sites," he said.
The key is to see your spirit is not flexible, will not use.
Ajax to cross domain, you can use the server to other sites to take content, such as asp.net:
First declare the following points:
1, explain if the feeling is very elementary, even if I loaded 13, do not "spray" Me Oh!
2, if there are those places wrong, but also hope that we can correct, must humbly consult;
3, this is only opinion, my
First, Ajax (Asynchronous JavaScript + XML) can request additional data like a server without unloading the page, that is, the local brush new technologySecond, create a XHR object
function createxhr () {
if (typeof XMLHttpRequest!=
Let's take a look at a simple jquery ajax return value JS
Code
Copy Code code as follows:
function getreturnajax{
$.ajax ({
Type: "POST",
Http://www.cnblogs.com/wlmemail/admin/%22ajax/userexist.aspx ",
Data: "Username="
Install first
asp.net ajax ExtensionsThis feature is a client-side feature that provides. NET 2.0 development AjaxNext InstallMicrosoft asp.net 2.0 AJAX Templates for Visual Studio 2008Template Kits This allows you to select an Ajax template in vs200
If you do not run a paragraph of JS code in Ajax,cs, you can:
Page.ClientScript.RegisterStartupScript (Page.gettype (), "", " label, this is false, otherwise true.
Note: The ASPX code is like this
I register the script in the
Copy Code code as follows:
/**
* Form submission Verification
**/
function OnSubmit () {
if ($ (' #name '). Val (). lengthAlert ("Name please not less than two characters");
return false;
}
var t = new Date (). GetTime ();
$.ajax ({
Copy Code code as follows:
var result = unescape (Xmlhttp.responsetext);
var j = eval ("(+ result +)");
Do not use var j = eval (result);
JSON (JavaScript Object notation) is a simple data format that is lighter than XML. JSON is the
But the commonly used command is ajaxmin-a-H inputfile.js-o outputfile.js (This is a high compression method)
The JS code can also be analyzed command is ajaxmin inputfile.js-a-w:3
For more information, refer to the help instructions.Ajaxmin.exe
There was a problem at work today.
The code is as follows:
Copy Code code as follows:
var Status=1;
var ob=$ ("[name= ' email ']");
$.ajax ({
URL: "{: U (' Home/index/checkemail ')}",
Data: "Email=" +query.email,
Type: "Post",
The following is a processing function for encapsulation, which is also very convenient to use:
The name of the file is named: JQuery.ajaxRequest.js.
How to use:
Copy Code code as follows:
$ ('. _ajax '). Click (function () {
Here's a finished function:
Copy Code code as follows:
function Reloadpromotion () {
var A = parsefloat ($ ("#pNormalTotal"). HTML ()) + parsefloat ($ ("#pBarginTotal"). html ());
Jquery.ajax (
{
URL:
1.Ajax Rain
Ajaxrain has many examples of perfectly integrated Ajax, CSS, DHTML, or JavaScript, and there are some demos that are really worth looking at, even if you're not a web design (development) guru.
2.Ajax Daddy
Ajax Daddy collects a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service