zoukankan      html  css  js  c++  java
  • 弹出层

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="弹出Div.aspx.cs" Inherits="WebLibrary.JS.弹出Div" %>
    <!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 runat="server">
        <title>Untitled Page</title>
        <script language="javascript" type="text/javascript">
     
    function getTop(e){ 
    var offset=e.offsetTop; 
    if(e.offsetParent!=null) offset+=getTop(e.offsetParent); 
    return offset; 
    }
     function findValue1(ddd){     
     
     var element=document.getElementById(ddd);
     
     document.getElementById("typediv1").style.visibility="visible";//显示
      document.getElementById('typediv1').innerHTML =ddd;
      document.getElementById("typediv1").style.top=getTop(element) ;
      document.getElementById("typediv1").style.left=event.x;
                                    
            }
            
            function findValue2( ){       
       document.getElementById("typediv1").style.visibility="hidden";//隐藏 
                                                   
            }
               
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div id="typediv1" style="visibility: hidden; z-index: 100; left: 25%; right: 25%;
            position: absolute; text-align: center; 50%; height: 120px; border-right: #009900 1px solid;
            border-top: #009900 1px solid; border-left: #009900 1px solid; border-bottom: #009900 1px solid;
            background-color: #f9fff6;">
             </div>
        <div>
        <asp:Label ID="lblTest" runat="server" onmouseleave="findValue2()" onmouseover="findValue1('lblTest')" Text="移动鼠标"></asp:Label>
        </div>
        </form>
    </body>
    </html>
  • 相关阅读:
    bootstrap轮播图--兼容IE7
    css清除默认样式和设置公共样式
    jq三级全选全不选
    妙味课堂--导航手风琴效果(转)
    妙味课堂首页--鼠标经过文字实现类似琴效果(转)
    eclipse导入git项目(转)
    根据屏幕分辨率设置样式
    css选择器
    h5新增标签兼容性
    4.Reverse Words in a String-Leetcode
  • 原文地址:https://www.cnblogs.com/TNTZWC/p/1951416.html
Copyright © 2011-2022 走看看