• 彩色签名


    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
        </head>
        <style type="text/css">
            .active{
                 10px;
                height: 10px;
                position: absolute;
                border-radius: 50%;
            }
        </style>
        <body>
        </body>
    </html>
    <script src="public.js">
    </script>
    <script>
        /*
        涉及的事件 :
        onmousedown
        onmousemove : 创建div 并设置div的位置 为鼠标当前位置
        onmouseup : 取消移动
         */
        document.onmousedown = function(e){
            e.preventDefault();
            document.onmousemove = function(e){
                var e = e || event;
                var oDiv = create("div");
                oDiv.className = "active";
                document.body.appendChild(oDiv);
                oDiv.style.backgroundColor = getColor();
                oDiv.style.left = e.pageX + "px";
                oDiv.style.top = e.pageY + "px";
            }
            document.onmouseup = function(){
                document.onmousemove = null;//取消移动
            }
            
            //return false;
        }
    </script>
  • 相关阅读:
    5 输出的properties文件按照key进行排序
    JFinal 部署在 Tomcat 下推荐方法(转)
    15个必须知道的chrome开发者技巧(转)
    一次完整的浏览器请求流程(转)
    工作第一天
    Struts2的crud
    equal 和 ==
    生成Apk遇到的问题
    Http Framework
    Gradle: The New Android Build System
  • 原文地址:https://www.cnblogs.com/tis100204/p/10319180.html
Copyright © 2020-2023  润新知