Home Web Front-end JS Tutorial JavaScript common global attributes and method records accumulation_Basic knowledge

JavaScript common global attributes and method records accumulation_Basic knowledge

May 16, 2016 pm 05:30 PM
global properties global method

Recently, I am learning JavaScript. The Java scope chain includes the global world. Recording the commonly used global properties and methods is regarded as the accumulation of knowledge. Not all are listed. If you want to view them all, you can refer to the JS-related API documentation.

Commonly used global attributes:

全局属性      作用                             
Infinity 表示正无穷大的数值
NaN 非数字值 
undefined 未定义的值

Commonly used global methods:
 全局方法      作用                             
encodeURI() 返回参数的副本,其中某些字符被十六进制的转义序列替换, 建议使用encodeURIComponent()
encodeURIComponent() 返回参数的副本,其中某些字符被十六进制的转义序列替换
decodeURI() 对encodeURI()转义的字符串解码
decodeURIComponent() 对encodeURIComponent()转义的字符串解码
escape() 用转义序列替换某些字符来字符串编码
unescape() 对用escape()编码的字符串解码
eval()  计算Javascript代码串,返回结果
isFinite() 检验一个值是否是无穷大的数字
isNaN()  检验一个值是否是非数字的值
parseInt() 从字符串解析一个整数
parseFloat() 从字符串解析一个小数
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Detailed explanation of the global function in Vue3: achieving more convenient global method calls Detailed explanation of the global function in Vue3: achieving more convenient global method calls Jun 19, 2023 am 08:52 AM

Detailed explanation of the global function in Vue3: achieving more convenient global method calls. In Vue3, a new global function is added. Its function is to register functions or objects into the global content of the application, so that we can call them in any component. Use these methods or objects directly. This greatly simplifies our development process and makes calling global methods more convenient. The following is a detailed explanation of the global function in Vue3: Registering methods to the global world We can use the global function to

What is the role of html global attributes? What is the role of html global attributes? Aug 16, 2023 pm 05:25 PM

The role of html global attributes: 1. The class attribute defines one or more style classes for the element; 2. The id attribute defines a unique identifier for the element; 3. The style attribute defines the inline style for the element; 4. The title attribute defines the element Provide additional tips; 5. The lang attribute specifies the language of the element; 6. The focus order of the element in the page with the tabindex attribute; 7. The accesskey attribute defines the shortcut key for the element; 8. The draggable attribute specifies whether the element can be dragged; 9. hidden etc.

Understand the global attributes of HTML tags Understand the global attributes of HTML tags Feb 18, 2024 pm 12:34 PM

HTML global attributes refer to general attributes that can be applied to HTML elements. They are not only applicable to specific HTML elements, but to all HTML elements. Global properties provide developers with a unified way to control the appearance and behavior of HTML, increasing consistency and scalability between HTML elements. Some common global attributes include: class: used to specify one or more CSS class names for an element, so that the appearance of the element can be decorated through a CSS style sheet. id: used for elements

A closer look at HTML5 global attributes: Five must-know points A closer look at HTML5 global attributes: Five must-know points Feb 26, 2024 am 10:33 AM

A Deeper Look at HTML5 Global Properties: Five Key Things You Need to Know HTML5 is a standard for building and rendering web pages that brings many new capabilities and features, one of which is global properties. Global attributes are attributes that can be applied to any HTML element. They are universal and affect the entire page. In this article, we’ll take a deeper look at HTML5 global properties and cover five key points you need to know. First, global attributes have a wide range of effects. Whether it is a text element or an image element, no

What are the global attributes of html? What are the global attributes of html? Aug 16, 2023 pm 05:05 PM

HTML global attributes include class, id, style, title, lang, accesskey, tabindex, hidden, draggable, editable, etc. These attributes can be applied to any HTML element. Global attributes are attributes that can be used by all HTML elements, whether inline or as tag attributes.

What are the global attributes of html? What are the global attributes of html? Feb 22, 2024 pm 08:48 PM

HTML global attributes (GlobalAttributes) are attributes that apply to all HTML elements. They can be used in any HTML tag. These global properties are intended to provide common attributes that enhance the functionality and style of HTML elements. Below we will introduce some commonly used HTML global attributes and attach corresponding code examples. class The class attribute is used to specify one or more class names to define styles for elements. Multiple class names can be separated by spaces. Stylesheets and Java

What does html global attribute mean? What does html global attribute mean? Oct 16, 2023 pm 04:54 PM

HTML global attributes are attributes that can be applied to all HTML elements. They are not specific to a particular element but apply to the entire HTML document. Global attributes are usually used to provide information about HTML elements, such as the element's name, class name, ID, style, etc. In HTML5, global attributes include some new features, such as data-* attributes, which are used to store private data of the page or application.

Master the skills of HTML global attributes to help you improve your web development capabilities Master the skills of HTML global attributes to help you improve your web development capabilities Feb 24, 2024 pm 03:27 PM

Improve web development skills: Master the skills of using HTML global attributes In today's digital era, web development is a very important skill. As more and more people are involved in web development, mastering the skills of using HTML global attributes will make your web pages better in terms of user experience. HTML (Hypertext Markup Language) is the basic language for building the structure of web pages. Global attributes are attributes that can be applied to any HTML element and provide some common functionality to the element. Next, let us learn about some common

See all articles