This article lists 21 Javascript tips worth adding to your favorites. In actual work, if you can use them properly, it will greatly improve your work efficiency.
1. Convert Javascript array to CSV format
First, consider the following application
This article describes how to convert the numeric type into a money format with no three commas. The following is a specific implementation of 3345687687876789123
Converted to: xxx, xxx, xxx
The Code is as follows:
JS functions are often used in many ways, such as getting page address parameters, address redirection, and determining whether a number is required. I have sorted out some information in this article. If you are interested, refer to Js to get page
The first note is that window. navigate and window. location. href both implement Page Link jump. The following describes their differences. For more information, see window. navigate and window. location. href.
Window. navigate ("http://jb51.net/
To convert a able to json, You Can serialize dt to json and put it into the hidden control hidBoundary at the front end. The specific implementation is as follows, if you have similar requirements, refer to section 1. serialize dt into json and put
WEB development is often used to solve the problems related to this Article. Here, we will summarize the usage and solve the problem of jQuery's object height, next, let's take a look at some of the issues related to document processing in WEB
Modularization is a way to separate the system into independent functional parts, which can be divided into independent functional parts, strict definition of module interfaces and transparency between modules are now under attack by MVC frameworks
Window. opener, via window. open the reference of the parent form of the child form. The following describes how to use it in detail. If you are interested, refer to window. opener, via window. open refers to the parent form of the child form.
For
This article provides a detailed analysis of the use of regular expressions in Javascript. For more information, see
The Regular Expression in js is much weaker than the regular expression in C #, but it is basically enough.1. Define a regular
This is a webpage password protection code implemented by JS. You need to enter the password in the pop-up box before entering the webpage, but it is not very useful now. Generally, currently, this function is processed in the background. After the
Parse xml documents and xml strings for ie and Firefox respectively, taking into account the compatibility of the browser, as for parsing xml in the ajax environment, the principle is the same, I just put it in ajax, but I still want to parse the
When an event on an element is triggered, for example, if you click a button, the same event will be triggered among all the ancestor elements of that element.
1. event TargetNow, the variable event in the event handler stores the event object. The
In JS, You need to determine whether a value is directly used by no function in the array. For example, the in_array () function exists in PHP. You can write a function similar to in_array () function Methods in Javascript need to determine whether
Get the implementation code of an adjacent element of the same type under FF Firefox.
The Code is as follows:
// Compatible with Firefox, which obtains the same type of last adjacent node of a nodeFunction perviussiblingsametype (node, cnode){//
Tooltip is a small function in the website, but it plays a very important role. It is often used to display some warm prompts. If the tooltip feature on the website is very creative, it will help you better understand the website, the 20 excellent
JQuery is the most popular and widely used JavaScript framework. It simplifies HTML document traversal, event processing, animation, and Ajax interaction, it helps Web developers to quickly implement a variety of exquisite Interface Effects jQuery's
In javascript, the shadow of Enumerable cannot be found at all, because the Prototype was referenced by the author from Ruby. In javascript, the shadow of Enumerable cannot be found at all, because the Prototype was referenced by the author from
Next, go to the String section above and proceed to the section in the following table.
Format
Camelize | capitalize|Underscore|Dasherize|Inspect
Deformation
ToArray|Succ|Times
One useful method here is inspect.
Recently I used javascript to write a simple calculator. It seems okay to test it myself. The Code has been commented out. It is very good. I suggest you learn it. Recently I wrote a simple calculator in javascript, and it feels okay to test it on
Recently, I was working on a ColdFusion project with a business Check that needs to be implemented using JavaScript: To determine whether the specified string is a valid number. This kind of check has been encountered many times before, but every
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.