First copy the following code into HTML, and run to see the effect
Copy Code code as follows:
Rice
Eat
Home
Back
You
Belt
Back to Top
Speed can control yourself oh.
The src attribute of the element can set the URL and initiate an HTTP GET request, using the Element Implementation script operation HTTP can communicate across domains without restriction and homology policy. Typically, when using a Ajax
DemandOpen another interface in one interface and use JS to get the user input value in another interface.Example:Index.html
Copy Code code as follows:
Home
"
Another interface:
Other.html
In web development, we often experience resetting all the input boxes.For example, in the query, the user is provided with a "reset" button to empty all the input boxes in the text.Then you can use jquery to unify the empty (reset).
Reset query
Rely on jquery, compatible with mainstream browsers such as Ie6\7\8 Firefox Chrom (absolutely original), but ask the great God to help me improve efficiency.
/** * jquery Pop-up Layer plugin * * @author lanhaoooo@163.com * @since 2014-08-23 * *
Provincial and municipal linkage, with the use of examples and data table data
Part of the data is accurate to township level!!!
Git Address: Http://git.oschina.net/upliu/province-city-district
Demo Code:
Province Urban three-level
Method 1:
Copy Code code as follows:
Method 2:
Copy Code code as follows:
Window.settimeout ("window.location= ' index.shtml '", 2000);
Jump to new page in two seconds
To read the sizzle compile implementation process, first need to understand the various subroutines involved in the function and key variables and role, I will be the jQuery-1.10.2 version of the compile code to explain, hope to give you help.
Copy Code code as follows:
Product introduction Products 1 Products 2 Products 3 Products 4 Products 5 Products 6 Service Introduction Service 1 Service 2 Service 3 Service 4 Success Stories Case 1 Case 2 Case 3 Case 4 About Us
let's look at the wrong example first.
HTML code
Copy Code code as follows:
JavaScript code
Copy Code code as follows:
function Show (value)
{
alert (value);
}
Btn.onclick = Show
Split converts a string to an array and outputs the code:
Copy Code code as follows:
JS Delete array elements:
var arr=[' A ', ' B ', ' C '];There are two ways to delete a ' B ' in it:
1.delete method: Delete Arr[1]
The JQuery on () method is an officially recommended method for binding events.
Copy Code code as follows:
$ (selector). On (Event,childselector,data,function,map)
A few of the previously common methods that have been extended
Example
Copy Code code as follows:
$ ("#top_notice"). CSS ("Display", "block");//1th method
$ ("#top_notice"). attr ("style", "display:block;"); /2nd Method
$ ("#top_notice"). Show ();//3rd method
1. To change the element
This example describes the implementation of jquery image switching. Share to everyone for your reference. as follows:
Untitled document
I hope this article will help you with your
Fade into the window, the background color is not clickable. Viewing effects: Http://runjs.cn/detail/t08gmoij
popup OK &
nbsp Cancellation OSChina baidu CSDN
The above is the entire contents of this article, I
1. Get a single checkbox selection (three ways to type):
Copy Code code as follows:
$ ("input:checkbox:checked"). Val ()
Or
Copy Code code as follows:
$ ("input:[type= ' checkbox ']:checked"). Val ();
Or
Special Effects Introduction
This picture slide is like roadside light box advertisement, roadside big billboard effect, led switch effect, and will keep at the lowest end of the page.
Demo diagram
How to use
1. Introduction of STYLE.CSS in
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