linux社区爱心援助Linux认证系列教程业界动态站务新闻公司招聘网络学院网址大全LPI专题CISCO专题
设为首页
加入收藏
管理团队
JSP  
JAVA  
PERL  
 您的位置:首页 > 开发语言 > JavaScript >
栏目导栏
  php
  JSP
  ASP
  asp.net
  JAVA
  c/c++/c#
  perl
  JavaScript
  Basic
  Delphi
资料搜索
热门文章
·javascript 时间对象的格式化
·去掉字符串前后的空格
·javascript 事件监听机制
·javascript 事件调用顺序
·js刷新框架子页面的七种方法
·JavaScript:替换字符串
·IE下的JScript编程需注意的内存
·用javascript操作word文档
·Javascript中CTRL+回车提交表单
·JS 获取鼠标位置
·javascript判断Email地址是否有
·Javascript中Select的OnChange
·JS实现的滑动展开与折叠效果
·有分页功能的WEB打印
·Javascript实现窗口最大化的严
最新文章
·使用CSS改变表格边框样式
·为网页添加浮动广告
·判断表单中添加是否数字的JS与
·让浏览器状态栏动起来
·使用Javascript制作行间颜色间
·禁止用右键查看源代码
·网页侦测四法
·制作弹出公告窗口
·为网页添加特效
·网页中取消鼠标右键方法大全
·JavaScript 根据屏幕解析度显示
·如何实现浏览器上的右键菜单
·如何制作浮动广告
·让弹出窗口变得“体贴”一些
·JavaScript技巧:让网页自动穿上
Google
 
JS+CSS打造可拖动的聊天窗口层
[ 作者:  加入时间:2007-10-30 14:28:20  来自:Linux联盟收集整理 ]

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">EUULinux联盟
<html xmlns="http://www.w3.org/1999/xhtml">EUULinux联盟
<head>EUULinux联盟
  <meta http-equiv="content-type" content="text/html; charset=gb2312">EUULinux联盟
  <meta http-equiv="content-script-type" content="text/javascript">EUULinux联盟
  <meta http-equiv="content-style-type" content="text/css">EUULinux联盟
  <title>DoDi Chat v1.0 Beta</title>EUULinux联盟
  <style rel="stylesheet" type="text/css" media="all" />EUULinux联盟
  <!--EUULinux联盟
  body {EUULinux联盟
    text-align:left;EUULinux联盟
    margin:0;EUULinux联盟
    font:normal 12px Verdana, Arial;EUULinux联盟
    background:#FFEEFFEUULinux联盟
  }EUULinux联盟
  form {EUULinux联盟
    margin:0;EUULinux联盟
    font:normal 12px Verdana, Arial;EUULinux联盟
  }EUULinux联盟
  table,input {EUULinux联盟
    font:normal 12px Verdana, Arial;EUULinux联盟
  }EUULinux联盟
  a:link,a:visited{EUULinux联盟
    text-decoration:none;EUULinux联盟
    color:#333333;EUULinux联盟
  }EUULinux联盟
  a:hover{EUULinux联盟
    text-decoration:none;EUULinux联盟
    color:#FF6600EUULinux联盟
  }EUULinux联盟
  #main {EUULinux联盟
    width:400px;EUULinux联盟
    position:absolute;EUULinux联盟
    left:600px;EUULinux联盟
    top:100px;EUULinux联盟
    background:#EFEFFF;EUULinux联盟
    text-align:left;EUULinux联盟
    filter:Alpha(opacity=90)EUULinux联盟
  }EUULinux联盟
  #ChatHead {EUULinux联盟
    text-align:right;EUULinux联盟
    padding:3px;EUULinux联盟
    border:1px solid #003399;EUULinux联盟
    background:#DCDCFF;EUULinux联盟
    font-size:11px;EUULinux联盟
    color:#3366FF;EUULinux联盟
    cursor:move;EUULinux联盟
  }EUULinux联盟
  #ChatHead a:link,#ChatHead a:visited, {EUULinux联盟
    font-size:14px;EUULinux联盟
    font-weight:bold;EUULinux联盟
    padding:0 3pxEUULinux联盟
  }EUULinux联盟
  #ChatBody {EUULinux联盟
    border:1px solid #003399;EUULinux联盟
    border-top:none;EUULinux联盟
    padding:2px;EUULinux联盟
  }EUULinux联盟
  #ChatContent {EUULinux联盟
    height:200px;EUULinux联盟
    padding:6px;EUULinux联盟
    overflow-y:scroll;EUULinux联盟
    word-break: break-allEUULinux联盟
  }EUULinux联盟
  #ChatBtn {EUULinux联盟
    border-top:1px solid #003399;EUULinux联盟
    padding:2pxEUULinux联盟
  }EUULinux联盟
  -->EUULinux联盟
  </style>EUULinux联盟
  <script language="javascript" type="text/javascript">EUULinux联盟
  <!--EUULinux联盟
  function $(d){return document.getElementById(d);}EUULinux联盟
  function gs(d){var t=$(d);if (t){return t.style;}else{return null;}}EUULinux联盟
  function gs2(d,a){EUULinux联盟
    if (d.currentStyle){ EUULinux联盟
      var curVal=d.currentStyle[a]EUULinux联盟
    }else{ EUULinux联盟
      var curVal=document.defaultView.getComputedStyle(d, null)[a]EUULinux联盟
    } EUULinux联盟
    return curVal;EUULinux联盟
  }EUULinux联盟
  function ChatHidden(){gs("ChatBody").display = "none";}EUULinux联盟
  function ChatShow(){gs("ChatBody").display = "";}EUULinux联盟
  function ChatClose(){gs("main").display = "none";}EUULinux联盟
  function ChatSend(obj){EUULinux联盟
    var o = obj.ChatValue;EUULinux联盟
    if (o.value.length>0){EUULinux联盟
      $("ChatContent").innerHTML += "<strong>Akon说:</strong>"+o.value+"<br/>";EUULinux联盟
      o.value='';EUULinux联盟
    }EUULinux联盟
  }

  if  (document.getElementById){EUULinux联盟
    (EUULinux联盟
      function(){EUULinux联盟
        if (window.opera){ document.write("<input type='hidden' id='Q' value=' '>"); }EUULinux联盟
      EUULinux联盟
        var n = 500;EUULinux联盟
        var dragok = false;EUULinux联盟
        var y,x,d,dy,dx;EUULinux联盟
        EUULinux联盟
        function move(e)EUULinux联盟
        {EUULinux联盟
          if (!e) e = window.event;EUULinux联盟
          if (dragok){EUULinux联盟
            d.style.left = dx + e.clientX - x + "px";EUULinux联盟
            d.style.top  = dy + e.clientY - y + "px";EUULinux联盟
            return false;EUULinux联盟
          }EUULinux联盟
        }EUULinux联盟
        EUULinux联盟
        function down(e){EUULinux联盟
          if (!e) e = window.event;EUULinux联盟
          var temp = (typeof e.target != "undefined")?e.target:e.srcElement;EUULinux联盟
          if (temp.tagName != "HTML"|"BODY" && temp.className != "dragclass"){EUULinux联盟
            temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;EUULinux联盟
          }EUULinux联盟
          if('TR'==temp.tagName){EUULinux联盟
            temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;EUULinux联盟
            temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;EUULinux联盟
            temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;EUULinux联盟
          }EUULinux联盟
        EUULinux联盟
          if (temp.className == "dragclass"){EUULinux联盟
            if (window.opera){ document.getElementById("Q").focus(); }EUULinux联盟
            dragok = true;EUULinux联盟
            temp.style.zIndex = n++;EUULinux联盟
            d = temp;EUULinux联盟
            dx = parseInt(gs2(temp,"left"))|0;EUULinux联盟
            dy = parseInt(gs2(temp,"top"))|0;EUULinux联盟
            x = e.clientX;EUULinux联盟
            y = e.clientY;EUULinux联盟
            document.onmousemove = move;EUULinux联盟
            return false;EUULinux联盟
          }EUULinux联盟
        }EUULinux联盟
        EUULinux联盟
        function up(){EUULinux联盟
          dragok = false;EUULinux联盟
          document.onmousemove = null;EUULinux联盟
        }EUULinux联盟
        EUULinux联盟
        document.onmousedown = down;EUULinux联盟
        document.onmouseup = up;EUULinux联盟
      EUULinux联盟
      }EUULinux联盟
    )();EUULinux联盟
  }EUULinux联盟
  -->EUULinux联盟
  </script>EUULinux联盟
</head>

<body>EUULinux联盟
<div id="main" class="dragclass" style="left:600px;top:300px;">EUULinux联盟
  <div id="ChatHead">EUULinux联盟
    <a href="#" onclick="ChatHidden();">-</a>EUULinux联盟
    <a href="#" onclick="ChatShow();">+</a>EUULinux联盟
    <a href="#" onclick="ChatClose();">x</a>EUULinux联盟
  </div>EUULinux联盟
  <div id="ChatBody">EUULinux联盟
    <div id="ChatContent"></div>EUULinux联盟
    <div id="ChatBtn">EUULinux联盟
      <form action="" name="chat" method="post">EUULinux联盟
      <textarea name="ChatValue" rows="3" style="width:350px"></textarea>EUULinux联盟
      <input name="Submit" type="button" value="Chat" onclick="ChatSend(this.form);" />EUULinux联盟
      </form>EUULinux联盟
    </div>EUULinux联盟
  </div>EUULinux联盟
</div>

</body>EUULinux联盟
</html>EUULinux联盟
 EUULinux联盟

Linux联盟收集整理 ,转贴请标明原始链接,如有任何疑问欢迎来本站Linux论坛讨论
评论】【加入收藏夹】【 】【打印】【关闭
※ 相关链接
无相关信息