zoukankan      html  css  js  c++  java
  • checkbox下面的提示框 鼠标移入时显示,移出时隐藏

    
    
    <html>
    <head>
    <title>shu</title>
        <style>#div1{width:200px;height:200px;border:1px solid red;background:grey;display:none;}</style>
        <script>
            function show(){
            var a=document.getElementById("div1");
            a.style.display='block';
            }
            function over(){
            var a=document.getElementById("div1");
            a.style.display='none';
            }
        </script>
    </head>
    <body>
        <input type="checkbox" onmouseover="show();" onmouseout="over();"/>
            <div id="div1">
            为了您的信息安全
            </div>
    </body>
    </html>
    
    
    


    鼠标移入到input上的时候,让div1显示
    鼠标移出input的时候,让div1隐藏

    div1显示:
    div1的display变成block

    ------------------------------------------------------------------------------------------------------------------------


    事件:用户操作

    on click

    ------------------------------------------------------------------------------------------------------------------------

    div1.style.display='block';

    . 的

    div1的style的display

    
    
    <html>
    <head>
    <title>shu</title>
        <script>
            function show(){
            var i=document.getElementById("tishi");
            i.click=alert("您确定吗?");
            }
        </script>
    </head>
    <body>
        <div id="div1">
            点击确认进入下一步操作:
        </div>
        <button id="tishi" onclick="show();">确定</button>
    </body>
    </html>
    
    

     
  • 相关阅读:
    element-ui获取table行数据
    去掉输入框的边框以及在显示获取焦点时的边框+jq日期选择器
    需要ui的小伙伴看过来(这篇博客只有一个链接希望对大家有用)
    vue获取当前对象
    FlashFXP用到的功能
    VS Code做项目的笔记
    单点登陆
    idea中自动生成实体类
    VSCode安装
    数组排序
  • 原文地址:https://www.cnblogs.com/Yimi/p/5922837.html
Copyright © 2011-2022 走看看