当前位置:网站首页>Summary browser object
Summary browser object
2022-07-24 06:37:00 【Slugs are not alone】
Browser object
The interview suddenly asked the methods of these objects , I won't remember a few for a while , To sum up :
One 、Window object
Window Object represents an open window in the browser .
Window Object methods :
| Method | describe |
|---|---|
| alert() | Display a warning box with a message and a confirm button . |
| atob() | Decode one base-64 Encoded string . |
| btoa() | Create a base-64 Encoded string . |
| blur() | Move keyboard focus away from the top window . |
| clearInterval() | Cancel from setInterval() Set up timeout. |
| clearTimeout() | Cancel from setTimeout() Method set timeout. |
| close() | Close the browser window . |
| confirm() | Displays a dialog box with a message and a confirm and Cancel buttons . |
| createPopup() | Create a pop-up window . |
| focus() | Give keyboard focus to a window . |
| getSelection() | Return to one Selection object , Indicates the text range selected by the user or the current position of the cursor . |
| getComputedStyle() | Gets the... Of the specified element CSS style . |
| matchMedia() | This method is used to check media query sentence , It returns a MediaQueryList object . |
| moveBy() | Moves the window to the specified pixel relative to its current coordinates . |
| moveTo() | Move the upper left corner of the window to a specified coordinate . |
| open() | Open a new browser window or find a named window . |
| print() | Print the contents of the current window . |
| prompt() | Displays a dialog box that prompts for user input . |
| resizeBy() | Resize the window to the specified pixel . |
| resizeTo() | Resize the window to the specified width and height . |
| scrollBy() | Scrolls content according to the specified pixel value . |
| scrollTo() | Scroll content to specified coordinates . |
| setInterval() | According to the specified period ( In milliseconds ) To call a function or evaluate an expression . |
| setTimeout() | Call the function or computing expression after the specified millisecond count. . |
| stop() | Stop page loading . |
| postMessage() | Secure cross source communication . |
Two 、History object
History Object contains user ( In the browser window ) Visited URL.
History Object methods :
| Method | explain |
|---|---|
| back() | load history The previous one in the list URL |
| forward() | load history Next... In the list URL |
| go() | load history A specific page in the list |
3、 ... and 、Location object
Location Object contains information about the current URL Information about .
Location The object is window Part of the object , It can be done by window.Location Property to access it .
Location Object methods :
| Method | explain |
|---|---|
| assign() | Load a new document |
| reload() | Reload the current document |
| replace() | Replace the current document with a new document |
边栏推荐
猜你喜欢

Data set and pre training model

LVM与磁盘配额

Do not rent servers, build your own personal business website (2)

Polkadot | interprets how liberty plan, which subverts traditional social media, will be launched in Poka

Experiment: disk quota operation

Tensorflow GPU installation -- 056

Function application of MySQL

FTP服务与实验

进程和计划任务管理

Sword finger offer jz10 Fibonacci sequence
随机推荐
Flink state use
Leetcode sword finger offer jz25 merges two sorted linked lists
测试经理/测试组长/测试主管面试题
Batch operation of generating MySQL statements from Excel
Sword finger offer jz10 Fibonacci sequence
United Nations agricultural products data analysis
Custom MVC 1.0
Li Kou 986. Intersection of interval lists
进行挂载永久挂载后无法开机
Polkadot | interprets how liberty plan, which subverts traditional social media, will be launched in Poka
Custom MVC 2.0
Grid layout
CentOS operating system security reinforcement
Leetcode refers to offer jz5 to replace the space string
MySQL batch modifies the data table code and character set to utf8mb4
How to build a website full of ritual sense and publish it on the public website 2-2
Write cookies, sessionstorage, localstorage and session at will
Life warning Maxim
Ia class summary (2)
MySQL from basic to entry to high availability