One, a new Ajax_start website
Add a Web service to your Web site (ws_start.asmx)In vs2008, adding a Web waiter becomes two files, one is the asmx file, the other is the CS file in App_Code; I think it's not good, it's not easy to manage, at least
Demand:
Input parameters to the Web page, pass the parameters to the server via Ajax, and receive on the server side
1, create a new Web project, Name: Ajax
2. Modify Index.jsp
The code is as follows
User id: Transmission
3. Create
Jquery
1. What is JQuery??
JQuery is an excellent JavaScript framework, a lightweight JavaScript class library.
The core idea of JQuery is Write less,do more.
Use JQuery to be compatible with various browsers to easily handle HTML, Events, animation
One: Add ajax validation to an element in a form
Two: Define AJAX validation related parameters
$.validationenginelanguage.allrules.ajaxnamecall = {
"url": "/admin/user/validate",
//"message when
It seems that Ajax is getting more and more hot, as a Web application developers if not this feeling will be outdated, and may even be in the job when the elimination of repeated. I am also a Web application developer, of course, I also want to
Turn from: http://www.open-open.com/lib/view/open1334026513327.html
Today in the project to do the remote data loading and rendering the page, until the development phase to realize the problem of Ajax Cross-domain request, vaguely remember jquery
1 The Done method in Ajax can be used after version 1.5 of jquery. This method has a similar effect as success in Ajax. It must first be after the 1.5 version in jquery.
such as:
2 Ajax's done. Parameters can be written as a method. is a
$.ajax of jquery (Url,[settings])1. The default contenttype value is: application/x-www-form-urlencoded; Charset=utf-8This format is the form submission format, the data is key1=value1&key2=value2 format2. Although the Data property value of Ajax is
1. In action
Class Action1 {
Private list deptlist; Give a Get method
Peivate String IDs,-------get Set
Public String functions () {
Deptlist=xiaoserviceimpl.getbyid (IDS)
Return "Ajax";
}
}
Configuration file:
deptlist \ [\ d+ \]\.id,deptlist\ [\
Recently done in a front-end separation of a project, which involves the issue of login verification. I'm using token plus filter.1, the front-end request login, with the user name and add the current time to generate a token, into Redis, and then
Internship Effect: Click on the Red Fork to delete, the entire page address is unchanged, to achieve local refresh
In the JSP page:
& Lt;input type= "hidden" id= "FileId" value= "${item.id}"/> ${item.fileName} X
In the controller:
Preface
1.Ajax Overview2.load () method3..get () and. Post ()
Ajax is all called: "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), which is not a single technology of JavaScript, but a combination of a series of interactive Web
To return data using jquery asynchronous request
function Showlog (account_id) {
var logss;
var ajaxurl= "/tes";
$.ajax ({
Url:ajaxurl,
method: "Get",
DataType: "JSON",
success:function (rs) {
LOGSS =
Preface
1.JSON and JSONP2.jqXHR object one. JSON and JSONP
If the $.ajax () method is in the same domain, the JSON file can be loaded as long as the DataType property is set. In the non-identical domain, JSONP can be used, but it is also
I am not a professional front-end development siege Lion, so, the level of this article, may be relatively low, some of the ideas inside, may be more ridiculous. If there are omissions or mistakes, I hope you can point them out. If the value of the
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