function Ajax(){varName =Document. getElementById (' username ').value Encodes special symbols (such as & =) that are passed on//and encoded in Chinese as well. Name = encodeURIComponent (name)varinfo ="Name="+ Name; 1. Create an Ajax objectvarXHR =
Call the MVC deletion method, which is labeled "Httpdelete"
Ajax invocation, type is "delete"
In native debugging, the error 404 method could not be found
So the web.config modifications in the MVC Project are configured as follows:
Use Jquery.validationengine Ajax to verify that the background ID exists
Front-desk jquery validation Framework Validation
Jsp:
/js/css/validationengine.jquery.css"/>
/js/jquery/jquery-1.4.2.min.js" >
/js/validation/jquery.validationengine-cn.js" >
Recently made a Spring+ajax two Cascade menu, always reported a variety of errors, and finally through the analysis and summary finally solve the problem, now the problem to show everyone, for sharing. If you have questions to comment on, definitely
Problem description: Want to implement click button, appear Blockui layer, and then enter information, click OK, close Blockui, and then invoke Ajax method, but each time to wait until the Ajax execution, the Blockui will be closed, the following
Methods Xhr.readystate of five states
Xhr.readystate = = Status (0,1,2,3,4) 0: The request was not initialized and open () was not called. 1: The request has been established, but has not been sent yet, and the Send () has not been called. 2: The
It is important to note the related configuration items in the Spring-mvc.xml (Spring controller configuration file)
text/html;charset=utf-8
--
The method in the controller
@RequestMapping (value = "/feedback",
It programmer development Essentials-all kinds of resources download list, history of the most IT resources, personal collection summary. Because sending messages with attachments can take a lot of time, so if you simply send the message in the form
Here are three popular ways to submit
Way One
Manual collection of all user input, encapsulated as a large "k1=v1&k2=v2 ..." key-value pair form, using $.post (URL, DATA,FN) to submit data to the server
$.ajax ({
type: ' Post ',
How to use: Jquery.ajax (Options)
The options have parameters, which appear in the form of Key/value.
In the use of the process, encountered a problem is that the callback method does not execute, and later checked, is the problem of caching.
one, the way to handle cross-domain:
1. Agent
2.XHR2
The XMLHttpRequest Level2 (and XHR2) provided in HTML5 have already implemented cross-domain access. But Ie10 does not support the following
Just fill in the response header on the service
the cache of Ajax blood and tears ~ ~
Scene: Project to IE5 render page, click Export List data (Excel form), click Export Send GET request, background generate Excel file, return file address information
Exception: IE the first return of the
Method OneUse Request.setcharacterencoding ("UTF-8") in the background;Method Two$.ajax ({ Type: ' Post ', ...... ContentType: ' application/x-www-form-urlencoded; Charset=utf-8 'Method Three (This method is absolutely possible)Foreground
Then the last advanced query. The fields in the drop-down boxes are all written in the foreground. This is a big drawback for the flexibility of the system.
Solution Ideas:
Create a Type dictionary table in the database. The drop-down box needs
First page;
function Gethttpobject (){var waystation=null;if (window. ActiveXObject){Waystation=new ActiveXObject ("Microsoft.XMLHTTP");}else if (window. XMLHttpRequest){Waystation=new XMLHttpRequest ();}Else{Waystation=false;}return
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.