JavaScript(四)Bom

it2025-11-28  16

介绍

window对象

alertconfirmpromptopenclose

定时器

setTimeoutclearTimeoutsetInervalclearInterval

location对象

location.hreflocation.hashlocation.hostlocation.hostnamelocation.pathnamelocation.portlocation.portocallocation.searchlocation.replacelocation.reload

history对象

history.backhistory.golocation.forward

screen对象

获取屏幕宽高 screen.availWidthscreen.availHeight

  2.获取窗口宽高

window.innerWidthwindow.innerHeight

  3.获取浏览器信息

navigator.userAgent

 

转载于:https://www.cnblogs.com/learn-python-M/p/7680338.html

相关资源:JavaScript_BOM.txt
最新回复(0)