In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly talks about "what are the objects supported by javascript". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what are the objects supported by javascript"?
The operating environment of this tutorial: windows7 system, javascript1.8.5 version, Dell G3 computer.
The JavaScript object is a collection of related properties and methods. Three kinds of objects are supported in JavaScript: built-in objects (native objects), browser objects, and custom objects.
1. JavaScript built-in object:
It refers to the predefined objects in the JavaScript language, which are defined in the ECMAScript standard and are implemented by all browser manufacturers. Because of the unity of the standard, the browser compatibility of these objects is not too big.
String 、 Number 、 Boolean 、 Array 、 Date 、 RegExp 、 Math 、 Error 、 Object 、 Function 、 Global
2. JavaScript Window-browser object:
The browser object model (Browser Object Model (BOM)) allows JavaScript to talk to the browser.
There is no official standard for the browser object Model (BOM). Modern browsers have (almost) implemented the same methods and properties of JavaScript interaction, so it is often mentioned as methods and properties of BOM.
Because modern browsers have (almost) implemented the same methods and properties of JavaScript interactivity, they are often considered to be BOM methods and properties.
Window object:
All browsers support window objects. It represents the browser window.
1), the window object is the top object
2). The window object has six attributes, including document, frames, history, location, navigator and screen, which are also objects themselves.
3) the document attribute under the window object is also an object, and five attributes (anchors, forms, images, links, location) under the document are also objects.
3. JavaScript custom object:
With JavaScript, you can define and create your own objects.
There are two different ways to create a new object:
Define and create an instance of an object
Use functions to define objects, and then create new object instances
Create a custom object:
Var person=new Object (); person.firstname= "John"; person.lastname= "Doe"; person.age=50;person.eyecolor= "blue"; [xss_clean] (person.firstname + "is" + person.age + "years old."). At this point, I believe you have a deeper understanding of "which objects are supported by javascript." Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.