Copy Code code as follows:
box with no options parameter (default high 200px, Width 300px)
General Set high Width box
Width Adaptive content high-wide box
box without pre-loading animation
Delay Automatically disappearing box
Title-Custom
Related reading:
JS Regular expression basic syntax (pristine)
Regular expression syntax
A regular expression is a literal pattern consisting of ordinary characters (such as characters A through Z) and special characters (called metacharacters).
select-option on
Click aaaaa Bbbbb ccccc &
Lt;div id= "Reslut" >
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Run the test.
The pictures covered in this article
using JavaScript custom radio and checkbox styles Single selection Box style: Men Women boy girl check box style: xhtml CSS javascript Flash Ajax AS Flex PHP/.NET/JSP
The Date object provides three methods:
1. Obtain the current time and date from the system;
2. Set the time and date;
3. Time, date converted into other formats.
Setyear Set the current year
Setmonth Set the current month
Setdate Set the current
The effect of a picture change in a Web page
Paste directly into the browser's address bar to see the effect of the operation
Remember to open a page with many pictures first
Copy Code code as follows:
javascript:r=0; x1=.1; y1=.05; x2=.25;
String method for pattern matching:
String supports 4 ways to use regular expressions:
Seach () is used to retrieve the parameter is a regular expression, returns the position of the first substring to match, returns-1 if the argument is not a
The looks like this:
Implement enumeration type, poker application function Createnum (p) {//constructor var enumeration = function () {Throw ' can not instantiate enumerations ';}
; Rewrite the prototype and assign the prototype to
Objective
Recent products need to do a lot of input boxes, the product wants the interactive effect is: Users can enter in English and Chinese, as the user input can real-time display the number of characters have been entered, when more than the
1. The most basic usage assigns an instance of ClassA to ClassB,
CLASSB inherits all the attributes of the ClassA.
Code in:
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
2. From
Copy Code code as follows:
function A (x)
{
this.x = x;
}
var obj = new A (5);
alert (obj.x);
The code is very simple, but it's important to see a very surprising result, and obj was given an attribute x, just as we would
Copy Code code as follows:
var jsobject = {} | | New Object ();
Jsobject.extend = function (subclass, superclass) {
First, determine if the subclass subclass is already defined, or redefine the class if it is undefined.
if (typeof subclass =
The first type is the previously mentioned private type, which is characterized by a complete lack of access to the outside world to access them, only through specific getter and setter.
The second type is a dynamic public type, characterized by
These things were clear to me before, but they were not explained, nor did they delve into these things. Today, while watching "Understanding through JavaScript", I saw the author's description, "Latrine" opened.
The present excerpt is as follows,
The method used in parsing is typically an eval or new function, and the current IE8 and Firefox3.1 are built with native JSON objects (supposedly a certain performance boost). So how do we choose from these three methods (because of the performance
In JS Development, we may encounter such a problem
When you need to dynamically insert HTML tags through JS
In particular, when encountered a large number of variable stitching, quotation marks layer nesting situation, there will be escape
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