JavaScript Array object manipulation, location object manipulation

Source: Internet
Author: User
Tags javascript array

Array Object Properties

Ff:firefox, Ie:internet Explorer

Properties Description FF IE
Constructor Returns a reference to the array function that created this object. 1 4
Index 1 4
Input 1 4
Length Sets or returns the number of elements in the array. 1 4
Prototype gives you the ability to add properties and methods to an object. 1 4
Array Object method

Ff:firefox, Ie:internet Explorer

Method Description FF IE
Concat () Joins two or more arrays and returns the result. 1 4
Join () Put all the elements of the array into a string. element is delimited by the specified delimiter. 1 4
Pop () Delete and return the last element of the array 1 5.5
Push () Adds one or more elements to the end of the array and returns the new length. 1 5.5
Reverse () Reverses the order of the elements in the array. 1 4
Shift () Delete and return the first element of the array 1 5.5
Slice () Returns the selected element from an existing array 1 4
Sort () Sorting elements of an array 1 4
Splice () Deletes the element and adds a new element to the array. 1 5.5
Tosource () Returns the source code for the object. 1 -
ToString () Converts the array to a string and returns the result. 1 4
toLocaleString () Converts the array to a local array and returns the result. 1 4
Unshift () Adds one or more elements to the beginning of the array and returns the new length. 1 6
ValueOf () Returns the original value of an array object 1 4
Location Object Properties
Properties Description IE F O
Hash Sets or returns the URL (anchor) starting with the pound sign (#). 4 1 9
Host Sets or returns the host name and port number of the current URL. 4 1 9
Hostname Sets or returns the host name of the current URL. 4 1 9
Href Sets or returns the full URL. 4 1 9
Pathname Sets or returns the path portion of the current URL. 4 1 9
Port Sets or returns the port number of the current URL. 4 1 9
Protocol Sets or returns the protocol for the current URL. 4 1 9
Search Sets or returns the URL (query section) starting with the question mark (?). 4 1 9
Location Object Methods
Properties Description IE F O
Assign () Loads a new document. 4 1 9
Reload () Reloads the current document. 4 1 9
Replace () Replaces the current document with a new document. 4 1 9

JavaScript Array object manipulation, location object manipulation

Related Article

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.