Core JavaScript objects

1. array object An array is a common data structure. It is generally used to store a group of identical objects or data. Main attributes: Attribute Description Length Number of elements in the current array

Javascript DOM programming Art

Built-in object:JavascriptThe defined object is called the built-in object! (For example, array, math, date)Host object:Objects running in a specific environment are host objects. For example, predefined objects provided by Web browsers are called

Javascript parseint ('08 ′)

Parseint () is used to convert the string into an integer. Generally, as long as it is a string starting with a number, it can be used successfully, for example, the result of parseint ('123a ') is 123, and the result of parseint ('12 34') is 12.

Javascript traversal of arrays and Properties of Objects

The array of JavaScript has the following creation methods: //Create ArrayVaRComputers =NewArray (); computers [0] = "Dell"; Computers [1] = "Acer";//Create a condensed ArrayVaRComputers =NewArray ("Dell", "Acer");//Create literal

Some Usage of javascript: History

Input Type = Button Value = Refresh Onclick = "Window. Location. Reload ()" > Input Type = Button Value = Forward Onclick = "Window. History. Go (1 )" > Input Type = Button Value = Backward Onclick = "Window. History. Go (-1

Javascript Regular Expressions match Chinese characters and special characters (the method for matching keywords in the Project)

In the project, we need to create a checkbox keyword to prevent repeated features. The idea of using JS is as follows: 1. Get the text of all checkpoints and put them in the array. 2. Input a keyword loop array and use indexof to judge Note:

Operate the parent window image (JavaScript) in the Child Window ))

Operate the parent window object in modaldialog 1, Cannot be usedWindow. Parent Window. ParentIs Used inFrameIn the dialog box, it cannot be used to operate the parent window object.   2And correct practices   CallModaldialogBy passing

Common JavaScript collection

1. oncontextmenu = "window. event. returnvalue = false" will completely block the right mouse buttonBorder oncontextmenu = return (false)> NO Available for table 2. cancel selection to prevent Replication 3.Onpaste = "Return false" Do not

Requesthelper used in Javascript

A small requirement is to display different content based on the input anchor (that is, the content after # in the URL). Remember what I wrote before, I don't know where I threw it, but I have to write another one. By the way, I have improved my

Exception Handling in Javascript

In JavaScript, try, catch, and finally can also be used for exception handling like in Java, C #, and other languages (supported by ie5.0 and later). The following is an example: Script Language = " Javascript " > Function Test

Javascript display time

RequestHelper used in JavaScript

The RequestHelper used in JavaScript met a small requirement, that is, to display different content based on the input anchor (that is, the content following # in the url). Remember what I wrote before, I don't know where I threw it, but I have to

Some basic Javascript scripts

1. Close the window without prompting 2. Prevent iframeIf (top. location! = Self. location){Top. location. href = "http://www.34do.net ";} 3. determine whether an object exists or notDocument. all ("a") = null (nonexistent) 4. A subwindow is

50 amazing JavaScript Application sites

With the rise of JavaScript frameworks such as jQuery, Mootools, and Prototype, Web developers have created amazing results based on these frameworks. All of the following 50 sites are based on JavaScript, but they have the same brilliant effect as

Javascript creation class

There are three methods. I only remember two. below is the test code. Some friends who do not know how to create JAVASCRIPT classes are used as references, and class inheritance are also issued to override the class method (but rewrite is not

Connect to the database using javascript

// Use JavaScript to write the sample code for connecting the server to the databaseVar conn = new ActiveXObject ("ADODB. Connection ");Conn. Open ("Provider = SQLOLEDB.1; Data Source = localhost; User ID = sa;" +"Password = sa; Initial Catalog =

Non-digit verification (Javascript)

1. Non-digit Verification: Var I = document. getElementById ('xxid'). value;If (! IsNaN (I )){Alert ("must be an integer! ");Return false;} 2. input continuous integer verification (using a regular expression ):

Place spaces in javascript

Trim: Remove space on both sides lTrim: Remove left space rTrim: Remove right space0 0 0(Please comment on the article)

Total Pages: 5378 1 .... 2641 2642 2643 2644 2645 .... 5378 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.