The push and join methods must be familiar to everyone. This article will introduce the use of the push and join methods in js. If you are interested, refer
The Code is as follows:
JQuery. fn and jQuery. prototype must be familiar to them. Do you know the differences between them? There is a good example in this article. You can refer to the source code of jQuery recently.
It is hard to understand this.
Here, jQuery, jQuery.
Self-starting functions should be familiar to everyone. In this article, we will discuss in detail, do not miss out on talking about them.
Let's take a look at two sections of code:
The Code is as follows:
Var elems = document.
You can select only one check box, and there are many implementation methods. This article introduces you in detail. If you have this requirement, refer to js below:
The Code is as follows:
Function chooseOne (chk ){// Obtain the set object of
This article introduces the differences in the use of window. location. For more information, see window. location. href = & http://www.webjx.com/javascript/ldquow.url#:to change the URL address;
Window. location. replace ("url"): replace the
There are many ways to control the image size. This article will introduce you in detail to use js to zoom in the image. The core code is as follows. If you are interested, refer to the following image scaling script to share the image.
The Code
Literally, parent is a set of elements that contain the unique parent element of all matching elements. Parents is a set of elements (excluding the root element) that contain the ancestor elements of all matching elements ). You can use an optional
The font-size attribute must be familiar to everyone. This attribute controls the font size. This article describes how to use jquery to obtain the font-size attribute value. For more information, see
The Code is as follows:
Var fontSize = $
There are many implementation methods. This article describes how to use jquery easily. If you are interested, refer to CSS:
The Code is as follows:
. BackToTop {Display: none;Width: 18px;Line-height: 1.2;Padding: 5px 0;Background-color:
Several JQuery-based Drag plug-ins are quite easy to use and have good results, but it is best to think about it yourself. Therefore, my idea is that even if someone else's program is used in the actual project, I have to write it out based on my
First, use the flag. The following Code sets the checkSubmitFlg flag. Second, set it in the onsubmit event to invalidate the submit button after the first submission. If you are interested, you can understand it.
First:Use the flag. The following
I have read the best practices for using JavaScript in Chapter 5 of this book, and I have heard most of the suggestions before, but I have a deeper understanding after reading this article. 1. To prevent the abuse of JavaScript, "no matter which web
This article describes how to call the JS method of a subpage on the parent page. If you need it, you can refer to it. After a day, I finally found a solution on the Internet.
Note: The problem is that the sub-PAGE method is called on the parent
Yesterday I encountered a very common problem about how to solve the connection problem of Ordered arrays. However, the code efficiency should be considered here, because the arrays to be connected are ordered, which is a very important prerequisite
Enter the data in the text box and press enter to submit the data. You may have tried it. This article provides a good example.
The Code is as follows:
Onblur = "if (this. value ='') {this. value = 'enter the name or mobile phone number of the
By default, the getQueryString method returns the string type. If it is of the int type, convert it when using JavaScript. The following is a good example.
The Code is as follows:
Function getQueryString (name ){Var reg = new RegExp ("(^ | &)"
The following methods are used to copy a new object or array. However, if you directly use the parent [iframe situation] method to get to the object in the parent window, there will be problems. If you are interested, you can understand
Two Methods
This article introduces examples and Analysis of comparing scroll and offset in js. If you need them, refer to 1. offsetTop:
The distance from the current object to the top of the upper layer.
You cannot assign a value to the object. Use the style.
First, apply and call are common things, but I am confused about bind, because this word is a frequently used method in jquery, I used to bind events to DOM elements. I saw a interview question a few days ago. The question is as follows:
What do you
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