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
Add the following code to the functions.php file.if (Is_admin ()) { function hcsem_cdn_callback ($buffer) {returnstr_ Replace$buffer);} function Hcsem_buffer_start () {Ob_start("Hcsem_cdn_callback");} function hcsem_buffer_end ()
According to the normal wording, there are always 404 errors, studied for a long time, found here the solution: Http://buxuxiao.com/article/using-jquery-to-post-frombody-parameters-to-web-apiNow summarize,In case of a single parameter:1, the
We have two websites: main.xxx.cn and prevei?xxx.cn. The main.xxx.cn page needs to load the content of preview.xxx.cn. There are two ways to load preview.xxx.cn content in the project. One is IFRAME and the other is Ajax. 1. IFRAME loading
Ii. Prototype library details
1. Use of prototype Library
// Import the downloaded prototype. JS File
// Directly use the prototype object in your own JS
2. Use the $ () function and $ () function to access HTML elements in the document.
$
Input data to server Ajax: 1. use Dom to obtain the form value input (F1) 2. use formdata to send Ajax data (F2) (no form, which uses the append () method to add data refer to F3)
User name: password: Email:
Speaking of comparison, I may want to introduce this product to you, but I already have a lot of understanding. Let me simply put it.
Ajax:
This is a web development technology used to create interactive web applications. It mainly uses the
We often encounter this requirement in projects-page partial refresh. For example, when a user is added and transferred to the add user page, all departments are automatically loaded on the page.
Complete process: select the Department, enter the
1. url:It must be a string parameter (the current page address by default.
2. Type:The request method (post or get) is get by default. Note that other HTTP request methods, such as put and delete, can also be used, but are only supported by some
(1)
JSON format of client request text: received in JSON format, and then parsed by JS (Eval is an object first, and then)
var text = this.responseText;var book = eval('('+ text +')');document.getElementById('btitle').value =
Use ajax to preview the link to view the content of the link. ajax Preview
First, let's look at the implementation code.
Html code
Previewing LinksA Gentle Introduction to JavaScriptAugust columnSeptember columnOctober columnNovember column
This
1. Design of shopping cart
ShoppingCartItem: encapsulation of a book, including three attributes: title, quantity, and price, and corresponding getter and setter methods.
ShoppingCart: the shopping cart encapsulation class. The items is Map , and
You can use the function to define the function in js. Call the function name directly. If there is a parameter, you can directly use the parameter, next I will introduce you to the definition and call examples of JavaScript Functions.
JavaScript
Next let's take a look at the article about replacing all the examples of javascript replacement functions. I hope this article will be helpful to you.
Only the first "a" letter can be replaced
Can replace all "a" Letters
In js, the most common method for closing a webpage is window. close () and window. the open () function is used in combination. Next I will introduce a variety of code for disabling web pages.
1. js code without any prompt to close the
1. XMLHttpRequest object of Ajax
XMLHttpRequest is the core of Ajax and is the key to Ajax implementation. It is used to send asynchronous requests, receive responses, and execute callbacks. XMLHttpRequest was first referenced in Microsoft Internet
The ajax login method is simple. You only need to simply use jquery post to send data and then jump to the specified Page Based on the returned value or return the successful login information to the specified id.
After the password and verification
In jquery, ajax can be classified as $. ajax $. get $. post $. getJSON $. there are several types of getscripts. I have found some examples to share with you. It is estimated that jquery ajax is really simple after reading them.
What Is AJAX?
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service