jquery is really a very good lightweight JS framework that can help us to develop JS applications quickly and to some extent change the way we write JavaScript code.Talk less, go straight to the point, we first look at some simple methods, these
XMLHTTPRequest object details
1. In Ajax applications, we use the XMLHTTPRequest object to send requests asynchronously. Such requests can be both get and post requests with request parameters.
After the request is sent out, the server response will
HTML. beginform and Ajax. beginform is a form Element in the MVC Architecture. They can be seen literally, namely, HTML. beginform is a normal form submission, while Ajax. beginform supports asynchronous form submission, which is a good news for
Right-click the menu today. When you click Rename to make an Ajax request, the page will jump directly to the homepage instead of sending data to the background. Bai Si cannot solve the problem. Later, he found a problem on the front-end page:Copy
There are still some shortcomings in a previously written Ajax random text refresh. At that time, the following algorithm was used to achieve the value from the server for a period of time:
Var secs = 300; // number of seconds for countdown
Before reading this article, specify a common variable xhr and xhr code ajax object. Test Browser: ie is ie6, firefox is 2, and others are not tested. Ie6 is Internet Explorer and firefox2 is ff.The most classic problem is the cache problem in
Ajax asynchronous transmission is widely used. Let's take web development as an example. When a user registers, how can he determine whether the user exists immediately and display a prompt after the input box? This uses asynchronous transmission
Data types are available in every programming language. js data types include: number type, string type, Boolean Type, indicates an object whose variable is not assigned a value or is empty. Let me introduce it to you.
Here we will only explain the
I have seen a foreign user using console. table () to debug javascript code. I feel this is very good. Next I will introduce you to using console. table () to debug javascript instances.
Maybe you are used to console. log () to debug js, very easy
I hope this article will be helpful to you in introducing a Javascript bitwise anti-operator article.
Executes bitwise non (evaluate not) operations on an expression.
Result = ~ Expression
Parameters
ResultAny variable.
Expression
Any
Garbled characters may occur when js ajax transmits Chinese characters. Because of the encoding problem, ajax is uft8 by default. In this way, url garbled characters are available. We just need to simply use the js encodeURI function for conversion.
Adding events in javascript is bound to events like jquery. To obtain elements, we can use getElementById directly. Next, let's take a closer look at how to add events in js and how to select elements.
I learned a few simple little effects today,
A function can contain parameters or no parameters. functions without parameters are mostly used for fixed operations. parameters are the most meaningful part of a function. Of course, anonymous functions do not have parameters.
The previously
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
In js, when both the parent and child pages belong to the same domain, the js methods between them can be called each other. You can specify the object to which the function belongs before calling the method. On the parent page, you can obtain the
Solution to passing garbled Chinese characters through POST or GET in AJAX
When AJAX is used in web development to pass a Chinese string, Firefox automatically converts the Chinese string to a hexadecimal character, while IE will directly pass the
The effects of refreshing comments are often used. This effect is very good for users and websites. The following small series will introduce you to an example of jquery ajax refreshing message boards and comments, I hope this tutorial will be
Jquery to verify the user name (ajax to verify whether the user name exists) Below we will provide a jquery plug-in to verify the user name. Here we use jquery ajax to verify whether the user name exists.
Jquery verifies the user name (ajax verifies
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