This article mainly introduces two methods for js dynamic splicing of regular expressions. For more information, see Method 1:
When creating a project, you may need to use js to verify the correctness of the form input. In this case, you need to
This article mainly introduces how to convert numbers into three-character comma-separated styles (Sample Code) in Javascript. If you need them, you can refer to them and hope to help you.
The Code is as follows:
Function formatNum (num){If (! /
This article mainly introduces how to use JS to clear the Word format. For more information, see
The Code is as follows:
CleanWord = function (){Var editBody = FCKeditorAPI. GetInstance ("text"). EditorDocument. body;Var html = FCKeditorAPI.
This article describes how to call Sina API to obtain short URLs. In this example, we will introduce how to use JQuery and Ajax. For more information, see
The Code is as follows:
Get Sina short URL
This article provides a detailed description of the usage of arguments, caller, callee, and apply in js. If you need them, refer to them, I hope it will be helpful for you to refer to the implicit parameter arguments of functions in javascript
This article mainly introduces how javascript automatically adds links to text url addresses. If you need them, you can refer to the implementation of automatic adding of URL addresses as follows: Detection and replacement.
Detection
"Detection" is
This article introduces the map method implemented by js. The example is as follows.
The Code is as follows:
/**** Description: map method implemented by js.* @ Returns {Map}*/Function Map (){Var struct = function (key, value ){This. key =
The text and values selected by the select statement are useful in many places and there are many implementation methods, in the following example, we will introduce in detail how jquery obtains the select statement:
Obtain the selected text in the
The reverse method reverses the position of elements in an Array object. The sort method returns an Array object whose elements have been sorted. Next we will introduce the reverse method first.
The reverse method reverses the element positions in
We often need to dynamically add various attributes to the Element in JavaScript, which can be achieved by using setAttribute (), which involves the browser compatibility problem setAttribute (string name, string value ): add a new attribute with
This is a jQuery-based effect. When the mouse hangs over a small image, a large image will pop up, and the big image will move with the mouse. This effect was originally originated from Comrade Min's idea, at the beginning, only the pop-up images
The real-time display time on the webpage not only adds color to the webpage, but also helps the viewer master the current time. In order to improve the website development speed, you can encapsulate the main code in a separate function and call it
This article provides some basic knowledge and related examples necessary for getting started with jquery. It is suitable for beginners to learn. It also provides some common jquery events. If you are interested, do not miss this article. juqery is
Array does not have the indexOf method, which makes it troublesome to search for the index of an element in an Array. Therefore, Array is extended through prototype. prototype. indexOf (), but there is a problem when traversing the Array. The Array
GUID (globally unified identifier) refers to the number generated on a machine. The following describes how to generate a GUID using native JavaScript. Do not miss the GUID (globally unified identifier) it refers to the number generated on a machine,
Jsdelete can delete object attributes and variables. The following are some examples. If you are interested, you can see 1. Delete object attributes.
Function fun () {this. name = 'mm';} var obj = new fun (); console. log (obj. name); //
To delete an HTML element, you can use remove and empty. The following describes how to use these two methods to delete or clear an HTML element.
Remove ()-delete a specified Element (including its child elements)Empty ()-clears child elements of a
This article mainly introduces the alternative usage of Javascript & amp; and |. If you need it, you can refer to it and have no idea about writing articles recently, I feel that there are always endless tasks. However, I started to study Titanium
Js html splicing requires attention to some details, that is, the single quotation marks. The following is an example to show you what you want others to solve for you,
What is adress,
Var hrf = ''+ adress + '';
Adress [j] is displayed
This article mainly introduces how to set the style of JavaScript by element ID and name. The following is a good example, if you are interested, you can test this article. This article mainly introduces how to set the style through the element ID
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