• 自制Javascript浮动广告


    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
    
    <!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></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <script type="text/javascript" language="javascript">
            function BodyStop() { return false; };
            function FindBrowserSize() {
                var winHeight = document.documentElement.clientHeight;
                var winWidth = document.documentElement.clientWidth;
                document.getElementById("min1").style.marginLeft = winWidth / 2 - 150 + "px";
                document.getElementById("min1").style.marginTop = winHeight / 2 - 100 + "px";
                document.getElementById("min1").style.display = "block";
                AutoTime();
            }
            function CloseDiv() {
                document.getElementById("min1").style.display = "none";
            }
            function MoveToRightBottem() {
                document.getElementById("min1").style.bottom = "0";
                document.getElementById("min1").style.right = "0";
            }
            function AutoTime() {
                var TimeNum = document.getElementById("TimeOut").innerHTML;
                if (TimeNum == 1) {
                    document.getElementById("TimeOut").style.display = "none";
                    MoveToRightBottem();
                }
                else {
                    TimeNum--;
                    document.getElementById("TimeOut").innerHTML = TimeNum;
                    setTimeout("AutoTime()", 1000);
                }
            }
            window.onresize = FindBrowserSize;
            window.onload = FindBrowserSize;
            document.body.oncontextmenu = BodyStop;
            document.body.onselectstart = BodyStop;
        </script>
        <div id="min1" style="position: fixed;  300px; height: 200px; background-color: #2b3b58;">
            <p style="text-align: right; padding-top: 0px; margin-right: 0px; margin-top: 0px;">
                <span id="TimeOut" style="color: red; margin-top: 0px; padding-top: 0px; top: 0px;
                    right: 0px;  30px; height: 20px;">7</span> <span id="CloseDiv" style="color: Red;
                        margin-top: 0px; padding-top: 0px; margin-right: 0px; top: 0px; right: 0px;  30px;
                        height: 20px;"><a href="javascript:CloseDiv();" style="color: Red">关闭</a></span>
            </p>
            <div id="mincontent">
                Hello World !<br />
                Hello World !<br />
                Hello World !<br />
                Hello World !<br />
                Hello World !<br />
            </div>
        </div>
        <div>
            Hello World !<br />
            <input type="button" value="移动" onclick="javascript:MoveToRightBottem();" />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
            Hello World !<br />
        </div>
        </form>
    </body>
    </html>
    
  • 相关阅读:
    机器学习推荐系统架构图
    mysql 的读写分离 以及mycat 实现集群管理
    逻辑回归 评价推荐质量 计算AUC
    jquery编写开关实现div的显示与隐藏
    php页面post方法实现ajax,入门实例教程
    php页面get方法实现ajax,入门实例教程
    JavaScript for...in 循环 JavaScript for...in 语句循环遍历对象的属性。
    删除已有的 HTML 元素
    创建新的 HTML 元素
    js常用事件及其用法
  • 原文地址:https://www.cnblogs.com/minotmin/p/3412489.html
Copyright © 2020-2023  润新知