JavaScript特效:弹出菜单
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="Generator" content="Dreamweaver8" />
<meta name="Author" content="枫叶随风 QQ:455948725 E-mail:liukun615@126.com" />
<link rel="shortcut icon" href="http://www.fengyekun.com/favicon.ico" />
<title>JavaScript弹出菜单</title>
<style type="text/css">
<!--
* {font-family:"宋体", Arial, Helvetica, sans-serif; margin:0px; padding:0px; font-size:12px;}
#main {width:100%;}
#content {
margin-top:100px;
}
#navbg {
background:#CC0033;
}
#nav {
position:relative;
margin:0px auto;
width:403px;
}
#menu li {
float:left;
width:100px;
height:30px;
line-height:30px;
}
#menu a:link,#menu a:visited,#menu a:hover {
color:#fff;
text-decoration:none;
}
#menudiv {
top:0px;
padding-top:30px;
width:100px;
}
#menudiv table {
width:100px;
border-top:1px solid #fff;
background:#CC0033;
}
#menudiv table td {
height:25px;
line-height:25px;
text-align:center;
color:#fff;
}
-->
</style&
相关文档:
scrollHeight: 获取对象的滚动高度。
scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离
scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离
scrollWidth:获取对象的滚动宽度
offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度
offsetL ......
首先,在各个浏览器中,断点调试支持的最好的当然是Firefox,Firefox不仅可以使用Firebug调试页面js脚本,还可以用高级调试工具例如JavaScript Debugger (Venkman) 来调试Firefox扩展里的js。除此之外,Firefox还支持一些更为高级的断点调试、变量监视功能。
其他浏览器里,Opera、Chrome和Safari的调试功能也比较好用。 ......
if (elename.equalsIgnoreCase("back") || elename.equalsIgnoreCase("1"))
return "<a href=\"javascript:window.history.back()\">后退</a>";
&nbs ......
1 创建脚本块
引用内容程序代码
<script language=”JavaScript”>
JavaScript 代码写在这里面
</script>
2 隐藏脚本代码
引用内容程序代码
<script language=”JavaScript”>
<!--
document.write(“Hello”);
// -->
</script>
在 ......
用call方法实现继承
function classA(sColor){
this.color=sColor;
this.sayColor=function(){
alert(this.color);
......