ajax 單個(gè)元素中實(shí)現(xiàn)多個(gè)回調(diào)函數(shù)的例子

          1.mousemat.htm
          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "<html>
          ?<head>
          ??<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
          ??<title>Untitled Document</title>
          ??<link rel='stylesheet' type = 'text/css' href = 'mousemat.css'>
          ??<script type='text/javascript'>
          ???var cursor = null;
          ???window.onload = function(){
          ????var mat = document.getElementById('mousemat');
          ????mat.onmousemove = mouseObserver;
          ????cursor = document.getElementById('cursor');
          ???}
          ???function mouseObserver(event){
          ????var e = event || window.event;
          ????writeStatus(e);
          ????drawThumbnail(e);
          ???}
          ???function writeStatus(e){
          ????window.status = e.clientX + "," + e.clientY;
          ???}
          ???function drawThumbnail(e){
          ????cursor.style.left = ((e.clientX/5)-2) + "px";
          ????cursor.style.top = ((e.clientY/5)-2) + "px";
          ???}
          ??</script>
          ?</head>
          ?<body>
          ??<div class='mousemat' id='mousemat'></div>
          ??<div class='thumbnail' id='thumbnail'>
          ???<div class = 'cursor' id = 'cursor'></div>
          ??</div>
          ?</body>
          </html>


          2.mousemat.css
          mousemat{
          ?background-color:#ffe0d0;
          ?border:solid maroon 0px;
          ?position:absolute;
          ?margin:0px;
          ?width:500px;
          ?height:500px;
          ?top:50px;
          ?left:50px;?
          }
          .thumbnail{
          ?background-color:#ffe0d0;
          ?border:solid maroon 0px;
          ?position:absolute;
          ?margin:0px;
          ?width:100px;
          ?height:100px;
          ?top:50px;
          ?left:600px;?
          }
          .cursor{
          ?background-color:blue;
          ?position:relative;
          ?height:5px;
          ?width:5px;
          }

          posted on 2006-08-11 16:12 software5168 閱讀(463) 評(píng)論(0)  編輯  收藏 所屬分類: Java學(xué)習(xí)

          <2006年8月>
          303112345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          導(dǎo)航

          統(tǒng)計(jì)

          常用鏈接

          留言簿(3)

          隨筆分類

          隨筆檔案

          收藏夾

          JAVA學(xué)習(xí)網(wǎng)站

          綜合

          搜索

          積分與排名

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 寿光市| 海安县| 叶城县| 蕉岭县| 大化| 澳门| 满城县| 体育| 绥阳县| 阿克陶县| 岑巩县| 西峡县| 阜城县| 怀安县| 资中县| 天镇县| 霍城县| 舒兰市| 剑河县| 寻甸| 玉环县| 喜德县| 汪清县| 莱芜市| 宕昌县| 廊坊市| 漯河市| 万年县| 永兴县| 翁源县| 乌兰县| 治多县| 资中县| 石首市| 许昌县| 根河市| 策勒县| 灵山县| 赣榆县| 尖扎县| 遂川县|