zoukankan      html  css  js  c++  java
  • input点击隐藏显示层

    input点击隐藏显示层
    http://www.corange.cn//uploadfiles/121201_84237.jpg

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE>Popup-Window</TITLE>
    <style>
    #alert {font-size:12px;border:1px solid #369;200px;height:50px;background:#e2ecf5;z-index:1000;position:absolute;}
    </style>
    <script>
    function hid()
    {
    var myAlert = document.getElementById("alert");
    myAlert.style.display = "none";
    }
    function onsub(name)
    {
    // mClose.onclick();
    hid();
    document.getElementById("new_one").value=name.innerHTML;
    }
    function new_hid()
    {
    hid();
    }

    </script>
    </HEAD>
    <BODY>

    <Br><Br><Br>
    <span id="content"><input type="text" value="" id="new_one"></span>

    <div id="alert" style="display:none;">
    <p><a href="javascript:void(0);" onclick="onsub(this);">www.corange.cn</a></p>
    <p><a href="javascript:void(0);" onclick="onsub(this);">test2</a></p>
    <p><a href="javascript:void(0);" onclick="onsub(this);">test3</a></p>
    <p><a href="javascript:void(0);" onclick="onsub(this);">test4</a></p>
    <p><center><span id="close" style="cursor:hand;">close</span></center></p>
    </div>
    <div style="100%;height:100%;" onclick="new_hid();"></div>
    <script type="text/javascript">
    var myAlert = document.getElementById("alert");
    var reg = document.getElementById("new_one");
    var mClose = document.getElementById("close");
    reg.onclick = function()
    {
    myAlert.style.display = "block";
    //myAlert.style.position = "absolute";
    //myAlert.style.width="200px";
    //myAlert.style.height="200px";
    // var a = window.event.x;
    // var b = window.event.y;
    // alert(a+ " "+b);
    myAlert.style.top=event.clientY;
    myAlert.style.left=event.clientX;
    }
    mClose.onclick = function()
    {
    myAlert.style.display = "none";
    }
    </script>


    </BODY>
    </HTML>

    原文地址:http://www.corange.cn/archives/2010/12/3747.html
  • 相关阅读:
    FPGA中亚稳态相关问题及跨时钟域处理
    异步FIFO---Verilog实现
    关于 FPGA 内部信号扇入扇出
    使用Xilinx IP核进行PCIE开发学习笔记
    aurora 64B/66B ip核设置与例程代码详解
    Verilog设计Valid-Ready握手协议
    【待写Java线程之线程终止 Interrupt 】
    【数据结构*转】斐波那契数列
    【数据结构】二分查找
    【待完善】资料记录
  • 原文地址:https://www.cnblogs.com/zerogo/p/1918038.html
Copyright © 2011-2022 走看看