易截截图软件、单文件、免安装、纯绿色、仅160KB

一个css javascript的二级横向菜单

  演示地址: http://www.wowo-design.com/view/51_01/index.htm
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>css菜单演示</title>
<style type="text/css">
<!--
*{margin:0;padding:0;border:0;}
body {
  font-family: arial, 宋体, serif;
font-size:12px;
}
#nav {
   line-height: 24px; list-style-type: none; background:#666;
}
#nav a {
  display: block; width: 80px; text-align:center;
}
#nav a:link {
  color:#666; text-decoration:none;
}
#nav a:visited {
  color:#666;text-decoration:none;
}
#nav a:hover {
  color:#FFF;text-decoration:none;font-weight:bold;
}
#nav li {
  float: left; width: 80px; background:#CCC;
}
#nav li a:hover{
  background:#999;
}
#nav li ul {
  line-height: 27px; list-style-type: none;text-align:left;
  left: -999em; width: 980px; position: absolute; float:left;
}
#nav li ul li{
  float: left; width: 80px;
  background: #F6F6F6;
}
#nav li ul a{
  display: block; width: 80px;text-align:center;
}
#nav li ul a:link {
  color:#666; text-decoration:none;
}
#nav li ul a:visited {
  color:#666;text-decoration:none;
}
#nav li ul a:hover {
  color:#F3F3F3;text-decoration:none;font-weight:normal;
  background:#C00;
}
#nav li:hover ul {
  left: 0;
}
#nav li.sfhover ul {
  left: 0;
}
#content {
  clear: left;
}
-->
</style>
<script type=text/javascript><!--//--><![CDATA[//><!--
function menuFix() {
  var sfEls = document.getElementById("nav").getElementsByTagName("li");
  for (var i=0; i<sfEls.length; i++) {
    sfEls[i].onmouseover=function() {
    this.className+=(this.className.length>0? " ": "") + "sfhover";
&nb


相关文档:

鼠标有关JavaScript事件

 <script>
var times = 0;
var ms = new Date();
var prex =0;
var pretoright=false;
var level =0;
function trackEarthQuake(){
     var curx = event.screenX;
     var toright ;
     if(curx>prex){
     ......

javascript节点操作DOMDocument属性和方法

 http://www.xker.com/page/e2008/0807/55407.html
最近发现DOMDocument对象很重要,还有XMLHTTP也很重要
注意大小写一定不能弄错.
属性:
1Attributes 存储节点的属性列表(只读)
2childNodes 存储节点的子节点列表(只读)
3dataType 返回此节点的数据类型
4Definition 以DTD或XML模式给出的节点的定义(只读 ......

JavaScript去掉两端空格方法

  // 去掉字符串左边空格
   function trimToLeft(str){
        var i;
        for(i=0;i<str.length; i++) {
            if(str.charAt(i)!=" ") break;
......

javascript的OO继承


在prototype框架中的类继承实现机制
//为Object类添加静态方法:extend
Object.extend = function(destination, source) {
  for(property in source) {
     destination[property] = source[property];
  }
  return destination;
}
//通过Object类为每个对象添加方法 ......

服务器端javascript弹出对话框和文件、目录操作

//服务器弹出对话框
 if (lcSID == "1" && (txtNsp.Text.Trim() != lcNewspaper || Convert.ToDateTime(txtNspdate.Text.Trim()) != Convert.ToDateTime(lcNspdate)))
        {
            string lcJs = "v ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号