The load () method loads the data from the server and puts the returned data into the selected element.The following example loads the contents of the id= "P1" element in the "Demo_test.txt" file into the specified element:$ ("#div1"). Load
The technical core of Ajax is the XMLHttpRequest object (abbreviated as XHR)First, create XMLHttpRequest object1 functioncreatexhr () {2 if(typeofXMLHttpRequest! = "undefined"){3 //IE7, FireFox, Opera, Chrome, Safari all
1 Create a new text.html pageWindow.onload=function () {document.getElementById (' Search '). Onclick=function () {var request=new xmlhttprequest ()//There is no judgment here, this is the method supported by IE browser, for other browsers to
1.ajax1.1.ajax IntroductionAjax introduction This part of our main talk about the origin of Ajax, what is Ajax? Because these are technology-independent. So, most of the details are a stroke.The origins of Ajax? The word Ajax stems from a
The Extensible Markup Language (XML) provides a method to describe structured data. Unlike HTML tags that are mainly used to control the display and appearance of data, XML tags are used to define the structure and data type of the data.
XML uses a
This article provides some suggestions on how to optimize DOM events in Javascript. Although many people now use the jquery plug-in, dom events are very important, I will share my experience on optimization.
In the development of JavaScript programs,
In javascript, we need to obtain the coordinates of the mouse position in several ways. One is the relative position (browser window, document location). Almost all of these are using document. body. scrollTop, document. body. dom commands such as
Here we verify that the date format is yyyy-mm-dd, so that when there is a fixed format of our regular expression, we can write it like this/^ (\ d {4 }) -(\ d {2})-(\ d {2}) $/to operate. I will introduce it below.
Example 1
The Code is
In js, Math functions can include various methods, such as Math. random (): Math. round (); Math. floor (); and Math. ceil (); opposite, Math. floor (); let me introduce it later.
Math functions are mainly used to process numbers.
Math. random ():
Many people think that programming languages are only used for work, and there is no pleasure. In fact, as long as we make full use of our whimsy, there is also an interesting aspect of rigid things. This article tells you that using JavaScript can
Js usage example: use split to separate specified strings
JavaScript uses split to separate specified strings. For example, comma (,) is used to separate long strings containing commas (,). It is widely used and its usage is quite simple, you can
I. What is event bubbling?
Trigger a certain type of event on an object (such as clicking an onclick event). If this object defines the event handler, this event will call this handler, if the event handler is not defined or the event returns true,
The Helper home (www.bkjia.com) provides an alternative usage of a text box, and uses JavaScript to slowly crawl text. This allows you to create a lot of special text effects.
text crawling-LIEHUO. NET If the effect cannot be displayed,
In JavaScript, var is used to declare a variable, but this syntax is not strictly required. If you modify it many times, you can directly use a variable instead of using var to declare it.Var x = "XX ";Y = "xxx ";And so on. This has a problem. For
In a twinkling of an eye, the seventh lesson will be the last one. If you feel that the level of the seven lessons has not reached the expected level, you can continue to follow the blog post on this site, I will release some similar articles to
Defines the global callback function and writes the timestamp parameter as the method name in the window. Here, my format is jsonp + timestamp. The same timestamp parameter can be used for sending requests and executing callback functions./***
You can use addEventListener to bind events and pass in the callback function.
Versions later than Mozilla 0.9.1 and Netscape 6.1 not only support passing function references, but also allow the objects with the handleEvent method to be directly
[JQuery Basics] 05 jQuery, Ajax, serialization, and jqueryajax
Well, this chapter is not as watery as the previous chapter, and it is always not good to fry leftovers.
About AJAX
The so-called Ajax, full name Asynchronous JavaScript and XML.
In jQuery, getJSON is often used to call and obtain a remote JSON string and convert it to a JSON object. If it is successful, the callback function is executed. The prototype is as follows:
JQuery. getJSON (url, [data], [callback]) loads JSON data
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