javasrcipt——BOM
2011-12-09 15:45
253 查看
window
-document
-anchors
-forms
-images
-links
-location
-frames
-history
-location
-navigator
-screen
window对话框
alert() 显示带有一段消息和一个确认按钮的警告框。
prompt() 显示可提示用户输入的对话框。
confirm() 显示带有一段消息以及确认按钮和取消按钮的对话框。
document属性
alinkColor 激活链接颜色
vlinkColor 访问过的链接颜色
linkColor 链接颜色
bgColor 页面背景色
fgColor 页面文本颜色
lastModified 最后修改页面的日期
referrer 浏览器历史中后退一个位置的url
title
URL 当前页面的url
document方法
document.write()
document.writeln()会在字符串末尾加上换行符(\n)
document.open()
document.close()
var oNewwin=window.open("about:blank","Newwindow","height=150,width=300,top=10,left=10,resizable=yes");
oNewwin.document.open();
oNewwin.document.write("<html><head><title>xxxxx</title></head>");
oNewwin.document.write("<body>tttttttttttttttttttt</body><html>");
oNewwin.document.close();
document集合
-anchors 页面中所有锚点
-forms 表单集合
-images 图片集合
-links 链接集合
-embeds 嵌入对象集合
集合使用方法document.images[0];document["name"];
history对象
go();
back();
forward();
length
location对象
属性 http://www.feng.com/pic/index.html hash #及号之后的内容
host www.feng.com
hostname feng.com
href 当前页面的完整url
pathname /pic/index.html
port 端口
protocol 获取//之前的内容
search 获取url中?及之后的neir
方法
assign("url") 加载页面
replace("url") 加载页面,但是不能从历史中查看
reload() true是从服务器重载,false是从浏览器缓存中重载
screen对象
width
height
availWidth
availHeight
************************/
alert(screen.availHeight+":"+screen.availWidth);
alert(history.length);
var oNewwin=window.open("about:blank","Newwindow","height=150,width=300,top=10,left=10,resizable=yes");
oNewwin.document.open();
oNewwin.document.write("<html><head><title>xxxxx</title></head>");
oNewwin.document.write("<body>tttttttttttttttttttt</body><html>");
oNewwin.document.close();
-document
-anchors
-forms
-images
-links
-location
-frames
-history
-location
-navigator
-screen
window对话框
alert() 显示带有一段消息和一个确认按钮的警告框。
prompt() 显示可提示用户输入的对话框。
confirm() 显示带有一段消息以及确认按钮和取消按钮的对话框。
document属性
alinkColor 激活链接颜色
vlinkColor 访问过的链接颜色
linkColor 链接颜色
bgColor 页面背景色
fgColor 页面文本颜色
lastModified 最后修改页面的日期
referrer 浏览器历史中后退一个位置的url
title
URL 当前页面的url
document方法
document.write()
document.writeln()会在字符串末尾加上换行符(\n)
document.open()
document.close()
var oNewwin=window.open("about:blank","Newwindow","height=150,width=300,top=10,left=10,resizable=yes");
oNewwin.document.open();
oNewwin.document.write("<html><head><title>xxxxx</title></head>");
oNewwin.document.write("<body>tttttttttttttttttttt</body><html>");
oNewwin.document.close();
document集合
-anchors 页面中所有锚点
-forms 表单集合
-images 图片集合
-links 链接集合
-embeds 嵌入对象集合
集合使用方法document.images[0];document["name"];
history对象
go();
back();
forward();
length
location对象
属性 http://www.feng.com/pic/index.html hash #及号之后的内容
host www.feng.com
hostname feng.com
href 当前页面的完整url
pathname /pic/index.html
port 端口
protocol 获取//之前的内容
search 获取url中?及之后的neir
方法
assign("url") 加载页面
replace("url") 加载页面,但是不能从历史中查看
reload() true是从服务器重载,false是从浏览器缓存中重载
screen对象
width
height
availWidth
availHeight
************************/
alert(screen.availHeight+":"+screen.availWidth);
alert(history.length);
var oNewwin=window.open("about:blank","Newwindow","height=150,width=300,top=10,left=10,resizable=yes");
oNewwin.document.open();
oNewwin.document.write("<html><head><title>xxxxx</title></head>");
oNewwin.document.write("<body>tttttttttttttttttttt</body><html>");
oNewwin.document.close();
相关文章推荐
- 关于JAVASRCIPT的方法的参数
- Javasrcipt,Ajax,Jquery用这些技术做了哪些东西,这些技术有什么优点,缺点
- javasrcipt在页面显示字符是document.write("aaa");
- javasrcipt
- javaSrcipt中的冒泡排序
- javasrcipt实现简单UBB代码方法
- Javasrcipt---HTML中使用Javascript
- JAVASRCIPT 学习跟踪
- JavaSrcipt获取HtmlStyle属性兼容方法
- 客户端javasrcipt操作Word
- JavaSrcipt的三种函数定义方法
- JavaSrcipt基础
- JavaSrcipt中的call()和apply()方法理解
- concat综合大全(Javasrcipt和mysql中的用法)
- 第一个JavaSrcipt例子
- 简单的javasrcipt选项卡
- javasrcipt系列---js闭包
- javasrcipt 常用属性,方法
- Acitity调用javasrcipt
- JavaSrcipt的Object.keys()