In this article, I'll share some of the JavaScript tips, tricks, and best practices that apply, with the exception of a few, whether it's a browser's JavaScript engine or a server-side JavaScript interpreter.1. Be sure to use the var keyword when
Definition and usageThe replace () method is used to replace other characters with some characters in a string, or to replace a substring that matches a regular expression.Stringobject.replace (regexp/substr,replacement)
Parameters
First we randomly create an object, which is very simple, open the FF browser's firebug switch to the console or open the WebKit browser's review element feature.Enter the following: var obj1=[1,2,3,4,5]var obj2=[5,4,3,2,1]var obj3=[obj1,obj2] Then
The arguments object of JavaScript is a simple introduction:Here is the simplest way to introduce the use of the arguments object, first look at a piece of code:var a=1; var b=2; function MyTest (b) { var c=a+B; document.write (arguments[0]); }
Display property hide does not occupy positionVisibility property hiding occupy positionUse the display's style property to hide the show//hide after not occupying the document flow position function Showaddform () {var attr =
What is a cross-domain
1, the Document.domain+iframe setting
2. Create script dynamically
3. Using IFRAME and Location.hash
4, Window.name realization of cross-domain data transfer
5. Use HTML5 postMessage
6. Using Flash
Closures are a unique concept in JavaScript, and for beginners, closures are a particularly abstract concept, especially the definition given by the ECMA specification, and it is difficult to understand it from the definition without actual combat
Full screens in HTML 5 can now be used in browsers other than IE and opera, sometimes forFull-screen API, game Ah, etc. are very useful. See the Common API first1 Element.requestfullscreen ()Function: Request an element full
Css implements border shadow and css border shadow
Css implements the border shadow effect:Sometimes the shadow border can effectively improve the appearance in some effects. The following describes how to use css to achieve this effect.The Code is
CSS implements a rectangle with a triangular arrow and a css triangle arrow.
CSS implements a rectangle with a triangular Arrow:Currently, the rectangular effects with small arrows are quite popular, such as the effects of mouse prompts and similar
Explain the strange performance of maxlength attributes in textarea, maxlengthtextarea
HTML5 has brought a lot of changes to the form. For example, the maxlength to be introduced today can be used to limit the maximum number of characters entered in
Analysis of js motion application instances and js Application Instances
This article provides two examples of js motion applications. The specific implementation content is as follows:
Application 1:
The js Code is as follows:
Application 2:
The
Bootstrap implements the default navigation bar effect.
The navigation bar is a good feature and a prominent feature of the Bootstrap website. The navigation bar is a responsive meta component that serves as the navigation title of an application or
Differences between hover, mouseover, and mouseout in jQuery,
This document analyzes the differences between hover, mouseover, and mouseout in jQuery. We will share this with you for your reference. The details are as follows:
Previously, I always
Examples of jquery. cookie. js usage,
This document describes how to use jquery. cookie. js. We will share this with you for your reference. The details are as follows:
The operation of cookies is always with us when we access a website, recording
How to solve the problem that the manual input of the easyui custom label datagrid edit combobox cannot be saved,
Use the onEndEdit event (this event can get the editor object, and the onAfterEdit event cannot get the Editor object)Use the editor to
Easy to learn about JavaScript 18: DOM in JavaScript1 DOM Overview
DOM (Document Object Model) is an application interface (API) for HTML and XML ). DOM plans the entire page as a document at the node level.
DOM depicts a hierarchical node tree,
Bootstrap tips and related resource sorting, bootstrap related resources1, Bootstrap Bundle (http://bootstrapbundle.com/): provides 15 different MVC Bootstrap templates. Search "Bootstrap Bundle" in [extension and update] to download and install the
Easily learn JavaScript 14th: JavaScript RegExp object (regular expression)
1. RegExp object Overview
The RegExp object represents a regular expression. RegExp is the abbreviation of a regular expression. It is a powerful tool for matching string
Easy to learn about BOM of JavaScript 15th: JavaScript
It took about 20 days to finish learning the ECMAScript core of the largest JS module. Although ECMAScript is an important standard, it is not
The only part of JavaScript, of course, is not the
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