Web development is very convenient based on struts2, and can also easily implement the FileUpload function, here demonstrated struts2 in the case of multiple file form upload operation
Struts.xml Action Definition
ActionResult
jquery
About Ajax, it's a technology that's been very hot lately, and it's very popular nowadays. Of course, it is not a new technology, but a unity under the various existing technologies and support mechanisms. In my project, Ajax is occasionally used to
jquery is really a nice lightweight JS framework that can help us quickly develop JS applications and, to some extent, change our habit of writing JavaScript code.
Cut the crap, go straight to the point, let's take a look at some simple methods that
Problem Description
When using JavaScript for AJAX access, the following error occurred
Cause of error: JavaScript is in security consideration and is not allowed to be accessed across domains.The following illustration is an explanation of
Ajax Cross-domain Access is an old problem, there are many solutions, more commonly used is the Jsonp method, the Jsonp method is an unofficial method, and this method only supports get way, not as safe as post method.
Even if you use the Jsonp
Problem Description:Front end uses Ajax to submit data to the background
$.ajax ({
URL: '/xxxx.ajax ', method
: ' Get ',
data: {
ids:[1,2,3,4,5,6]
},
dataType: ' JSON ',
success:function
Turn from: http://jingyan.baidu.com/article/7c6fb4281d685780642c900a.html
Ajax itself does not support cross-domain, the cross-domain problem is actually very simple, through the corresponding settings of the browser can complete two different
When we register a user, will prompt that the user's information is available, this is the AJAX application, has seen this realization long ago, today looked again, to record down O (∩_∩) o ha.
I also have this introduction on my original blog ...
The following files need to be introduced
/static/js/plugins/datatables/datatables.min.js" >
I might also need a jquery file, but I've got too many projects to introduce, and if I don't see the table properly, please introduce yourself to other
Quick query: by inner tube code by tag Code
Here is the referenced JS file
$ (document). Ready (function () {$ ("#fastsearchTxt"). KeyUp (function () {//ajax Get database query data var = $ ("#fast
Searchtxt "). Val ();
jquery Ajax is already very convenient, why in the further encapsulation of it. This first depends on the specific requirements of the project, and if you don't think you need it, then you can simply use the various Ajax methods provided by jquery
1. Parent page:
This list data needs to be brought from the child page, query out for a list, need to be replaced with JSON.
2.js
Initiate verificationfunction Getinspect () {var Flowid = $ ("#flowId"). Val ();var Injureid = $ ("#injureId"). Val ();
Note: When Using ajax to call WebService, try to use IE. If chrome or Firefox is used, the following exceptions may occur:
2013-6-1 11:10:02 com. Sun. xml. Internal. ws. Transport. http. server. wshttphandler handleexchange warning: cannot
After a request is sent, the client cannot determine when the request will be completed. Therefore, an event mechanism is required to capture the Request status. The XMLHTTPRequest object provides the onreadystatechange event to implement this
Masterpiece of the world's first jquery book, the father of jquery
Amazon's five-star reputation is currently the most in-depth JS book
Pingdom, a Web Monitoring Service Company, collects statistics on the use of JavaScript/Ajax frameworks by top 100
The X-requested-with request header is used on the server to determine whether a request comes from an Ajax request or a traditional request.
The two types of requests have different headers. Ajax asynchronous requests have one more header parameter
There are three URL encoding methods
Escape (), Unescape () encodeuri (), decodeuri () encodeuricomponent (), decodeuricomponent () encoding plays different roles
Escape () method:
The specified string is encoded using the ISO Latin character set.
1. Four technical cornerstones of AJAXJavascript + CSS + DOM + XMLHttpRequestUsing dom (Document Object Model) to define the structure of the user interface is a set of programmable objects that can be operated using JavaScript to display the
I encountered the problem of Ajax garbled code today. I found some materials on the Internet for a long time and tried many methods. I am grateful for the correct method. Address: http://www.blogjava.net/hulizhong/archive/2007/04/21/112416.html
Ajax
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.