• 点不到的NO


    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <style>
                html,body{
                    margin:0;
                    padding:0;
                    100%;
                    height:100%;
                }
                #box{
                    1200px;
                    height:700px;
                    position: absolute;
                    top:50%;
                    left:50%;
                    margin-top:-350px;
                    margin-left:-600px;
                }
                span{
                    display:block;
                    300px;
                    height:60px;
                    line-height: 60px;
                    font-size:30px;
                    color:#FF0000;
                    position: absolute;
                    top:50%;
                    left:50%;
                    margin-top:-30px;
                    margin-left:-150px;
                }
                input{
                    40px;
                    height:20px;
                }
                #btnY{
                    position: absolute;
                    top:400px;
                    left:500px;
                }
                #btnN{
                    position: absolute;
                    top:400px;
                    left:580px;
                }
            </style>
        </head>
        <body>
            <div id= "box">
                <span>Do you love me ?</span>
                <input type="button" value="yes" id="btnY"/>
                <input type="button" value="no" id="btnN"/>
            </div>
        </body>
    </html>
    <script>
        var oBtnY = document.getElementById("btnY");
        var oBtnN = document.getElementById("btnN");
        oBtnY.onclick = function(){
            alert( "哈哈,我也喜欢你" )
        }
    oBtnN.onmouseover = function(){
    oBtnN.style.left = Math.floor(Math.random()*700)+"px";
    oBtnN.style.top = Math.floor(Math.random()*700)+"px";
    }

        function haha(){
    oBtnN.style.left = Math.floor(Math.random()*700)+"px";
    oBtnN.style.top = Math.floor(Math.random()*700)+"px";
    }

    </script>
  • 相关阅读:
    AlphaGo的前世今生(三)AlphaGo Zero: AI Revolution and Beyond
    AlphaGo的前世今生(二)AlphaGo: Countdown to AI Revolution
    AlphaGo的前世今生(一)Deep Q Network and Game Search Tree:Road to AI Revolution
    Exception starting filter [Tongweb WebSocket (JSR356) Filter
    spring boot 集成 redis 出现 “Unable to connect to localhost:6379”
    对女性友好的编程语言
    Git(1)
    js里面看一个字符串的汉字的个数
    celery使用的一些小坑和技巧(非从无到有的过程)
    永远相信美好的事情即将发生。
  • 原文地址:https://www.cnblogs.com/tis100204/p/10319186.html
Copyright © 2020-2023  润新知