模拟浏览器菜单
来源:互联网 发布:office有哪些软件 编辑:程序博客网 时间:2024/06/05 18:21
<li>* 除可以检测用户浏览器的相关信息之外,还可以对用户浏览器进行一定的控制。使用Window对象可以控制用户浏览器窗口的外观。例如,可以使用 window.scrollTo( )或window.resizeTo( )滚动窗口,或者改变其大小,还可以使用window.status( )或 window.defaultStatus( )改变浏览器的状态栏信息。
<li>* Netscape和Opera支持大量模拟浏览器活动的方法,例如单击按钮。IE则不支持众多类似的方法,然而对于IE用户,至少可以使用对象检测技术进行模拟,而不致使程序报错。
<li>* Window对象的print( )方法、forward( )方法、back( )方法、home( )方法、stop( )方法,分别对应浏览器菜单中的打印、前进、后退、默认主页、停止等功能。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>模拟浏览器菜单</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#ffc0c0">
<h1 align="center">模拟浏览器菜单</h1><hr>
<!--控制表单-->
<form action="#" method="get">
<table border="1" bordercolor="green" cellspacing="5" cellpadding="5"><tr><td>
<!--设置不同的表单,分别通过onclick调用相应的函数,完成不同的事件模拟-->
<input type="button" value="打印"
onclick=" if (window.print) window.print();">
</td><td>
<input type="button" value="前进"
onclick="if (window.forward) window.forward();">
</td><td>
<input type="button" value="后退"
onclick="if (window.back) window.back();">
</td><td>
<input type="button" value="主页"
onclick="if (window.home) window.home();">
</td><td>
<input type="button" value="停止"
onclick="if (window.stop) window.stop();">
</td></tr></table>
</form>
</body>
</html>
<li>* Netscape和Opera支持大量模拟浏览器活动的方法,例如单击按钮。IE则不支持众多类似的方法,然而对于IE用户,至少可以使用对象检测技术进行模拟,而不致使程序报错。
<li>* Window对象的print( )方法、forward( )方法、back( )方法、home( )方法、stop( )方法,分别对应浏览器菜单中的打印、前进、后退、默认主页、停止等功能。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>模拟浏览器菜单</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#ffc0c0">
<h1 align="center">模拟浏览器菜单</h1><hr>
<!--控制表单-->
<form action="#" method="get">
<table border="1" bordercolor="green" cellspacing="5" cellpadding="5"><tr><td>
<!--设置不同的表单,分别通过onclick调用相应的函数,完成不同的事件模拟-->
<input type="button" value="打印"
onclick=" if (window.print) window.print();">
</td><td>
<input type="button" value="前进"
onclick="if (window.forward) window.forward();">
</td><td>
<input type="button" value="后退"
onclick="if (window.back) window.back();">
</td><td>
<input type="button" value="主页"
onclick="if (window.home) window.home();">
</td><td>
<input type="button" value="停止"
onclick="if (window.stop) window.stop();">
</td></tr></table>
</form>
</body>
</html>
- 模拟浏览器菜单
- 模拟菜单
- 模拟tomcat,模拟浏览器
- 浏览器鼠标右键菜单
- 自定义浏览器,菜单
- 浏览器禁用右键菜单
- 自制浏览器右键菜单
- 屏蔽浏览器右键菜单
- 自定义浏览器右键菜单
- 模拟qq菜单
- 模拟QQ菜单效果
- javascript模拟菜单
- js 模拟右键菜单
- ul模拟列表菜单
- 模拟bootstrap下拉菜单
- Ajax模拟树状菜单
- python脚本模拟浏览器
- 模拟浏览器抓取网页
- 单元测试与功能测试之间的区别
- symbian C++ 各种类型之间的转换
- Free webcast: "AutoCAD: .NET for LISP Programmers"
- 调整浏览器窗口
- 客户端性能检测
- 模拟浏览器菜单
- Symbian DBMS中的检索
- 乱七八糟
- 实现md5加密
- 学好Java关键的几点
- Linux环境下USB的原理、驱动和配置
- 字符串翻倍
- 新编日语-第9课 家族
- TreeView简单实现