当前位置:网站首页>BOM document
BOM document
2022-06-26 05:34:00 【The simplicity of programmers】
1.BOM The concept of
BOM(Browser Object Model) The browser object model , The browser object model provides content independent 、 Object structure that can interact with browser windows .BOM Composed of multiple objects , Which represents the browser window Window The object is BOM The top object of , Other objects are children of the object .
2.BOM The top object of window, When calling window Properties and methods under can be omitted window.
3. Page load event
onload attribute
window.onload = function () {
// When the page is loaded, execute
// When the page is fully loaded ( Include images 、 Script files 、CSS Documents, etc. ) perform
}onunload attribute
window.onunload = function () {
// Execute... When the user exits the page
}4. Timer
setTimeout() and clearTimeout()
Executes the specified function after the specified number of milliseconds , Only once .
// Create a timer ,1000 In milliseconds, execute , Return to the mark of the timer
var timerId = setTimeout(function () {
console.log('Hello World');
}, 1000);
// Cancel the timer
clearTimeout(timerId);setInterval() and clearInterval()
Functions that are called regularly , At a given time ( Unit millisecond ) Call the function periodically
// Create a timer , every other 1 One call per second
var timerId = setInterval(function () {
var date = new Date();
console.log(date.toLocaleTimeString());
}, 1000);
// Cancel the timer
clearInterval(timerId);
5.location object
location The object is window Object , Time can be omitted window object
location Can get or set the browser address bar URL
6.URL
Uniform resource locator (Uniform Resource Locator, URL)
URL The composition of
scheme://host:port/path?query#fragment
scheme: Communication protocol
frequently-used http,ftp,maito etc.
host: host
The server ( Computer ) The domain name system (DNS) Host name or IP Address .
port: Port number
Integers , Optional , Use the default port of the scheme when omitted , Such as http The default port is 80.
path: route
By zero or more '/' String separated by symbols , Generally used to represent a directory or file address on the host .
query: Inquire about
Optional , Used to pass parameters to dynamic web pages , There can be multiple parameters , use '&' Symbols separate , The name and value of each parameter are '=' Symbols separate . for example :name=zs
fragment: Pieces of information
character string , Anchor point .
location Who are the members ?
Use chrome The console view
assign()/reload()/replace()
hash/host/hostname/search/href……
7.history object
back()
forward()
go()
8.navigator object
userAgent
adopt userAgent You can determine the type of user's browser
platform
adopt platform You can judge the system platform type of the browser
边栏推荐
- bingc(继承)
- 无线网络存在的安全问题及现代化解决方案
- 1212312321
- 使用Jedis監聽Redis Stream 實現消息隊列功能
- Data storage: the difference between MySQL InnoDB and MyISAM
- Project suspension
- Lesson 4 serial port and clock
- The wechat team disclosed that the wechat interface is stuck with a super bug "15..." The context of
- FindControl的源代码
- Tp5.0 framework PDO connection MySQL error: too many connections solution
猜你喜欢

Could not get unknown property ‘*‘ for SigningConfig container of type org. gradle. api. internal

Setting pseudo static under fastadmin Apache

The parameter field of the callback address of the payment interface is "notify_url", and an error occurs after encoding and decoding the signed special character URL (,,,,,)

【红队】要想加入红队,需要做好哪些准备?

PHP 2D / multidimensional arrays are sorted in ascending and descending order according to the specified key values

Command line interface of alluxio

Install the tp6.0 framework under windows, picture and text. Thinkphp6.0 installation tutorial

pytorch(网络模型训练)

The State Council issued a document to improve the application of identity authentication and electronic seals, and strengthen the construction of Digital Government

LeetCode_ Binary search tree_ Simple_ 108. convert an ordered array to a binary search tree
随机推荐
定位设置水平,垂直居中(多种方法)
How does P2P technology reduce the bandwidth of live video by 75%?
Uni app ceiling fixed style
Something about MariaDB
Lesson 4 serial port and clock
小小面试题之GET和POST的区别
A new explanation of tcp/ip five layer protocol model
skimage.morphology.medial_axis
使用Jenkins执行TestNg+Selenium+Jsoup自动化测试和生成ExtentReport测试报告
Tp5.0 framework PDO connection MySQL error: too many connections solution
【活动推荐】云原生、产业互联网、低代码、Web3、元宇宙……哪个是 2022 年架构热点?...
售前分析
Source code of findcontrol
bingc(继承)
[PHP] PHP two-dimensional array is sorted by multiple fields
Supplementary course on basic knowledge of IM development (II): how to design a server-side storage architecture for a large number of image files?
转帖——不要迷失在技术的海洋中
[red team] what preparations should be made to join the red team?
C XX management system
FindControl的源代码