jsforim

 

var isMouseDown=false;
var isFirst=true;
var centerdivObj;
var ndiv1;
var ndiv2;
var ndiv3;
var kjX;
var kjY;

window.οnerrοr=function()
{
    return true;
};

var thurl='http://qq.jutoo.net/';
var wzId='12345';

function createDiv()

    var sW=screen.width;
    var sH=screen.height;
   
    createDivObj();
    //中间div
    centerdivObj.style.position="absolute";
    centerdivObj.id="cd_id";
    centerdivObj.style.left=(sW-439)/2+"px";
    centerdivObj.style.top=(sH-159-200)/2+"px";
    centerdivObj.style.width="439px";
    centerdivObj.style.height="159px";
    centerdivObj.style.overflow="hidden";
    centerdivObj.style.cursor="move";
    centerdivObj.style.backgroundImage="url("+thurl+"Image/tt.bmp)";
   
    document.body.appendChild(centerdivObj);
    //左边div
    var leftDivObj=document.createElement("div")
    leftDivObj.style.position="absolute";
    leftDivObj.style.left="10px";
    leftDivObj.style.top="50px";
    leftDivObj.style.visibility="visible";
    document.body.appendChild(leftDivObj);
   
    //左边小div头部
    var leftDivMinObj=document.createElement("div")
    leftDivMinObj.style.position="absolute";
    leftDivMinObj.style.cursor="pointer";
    leftDivMinObj.style.left="10px";
    leftDivMinObj.style.top="50px";
    leftDivMinObj.style.width="117px";
    leftDivMinObj.style.height="20px";
    leftDivMinObj.style.backgroundImage="url("+thurl+"Image/leftt.gif)";
    leftDivMinObj.style.visibility="hidden";
    leftDivMinObj.οnclick=function()
    {
        leftDivObj.style.visibility="visible";
        leftDivMinObj.style.visibility="hidden";
    };
    document.body.appendChild(leftDivMinObj);
   
    //左边div头部
    var leftDivHeadObj=document.createElement("div");
    leftDivHeadObj.style.cursor="pointer";
    leftDivHeadObj.style.width="117px";
    leftDivHeadObj.style.height="20px";
    leftDivHeadObj.style.backgroundImage="url("+thurl+"Image/leftt.gif)";
    leftDivHeadObj.οnclick=function()
    {
        leftDivObj.style.visibility="hidden";
        leftDivMinObj.style.visibility="visible";
    };
    leftDivObj.appendChild(leftDivHeadObj);
   
    //左边div中间部
    var leftDivbodyObj=document.createElement("div");
    if(document.compatMode=="CSS1Compat")
        leftDivbodyObj.style.width="111px";
    else if(document.compatMode=="BackCompat")
        leftDivbodyObj.style.width="117px";   //不要指定高,指定了高div就不会延伸了(兼容问题)
    leftDivbodyObj.style.overflowX="hidden";
    leftDivbodyObj.style.border="rgb(0,100,191) solid 3px";
    leftDivbodyObj.style.borderTop="none";
    leftDivbodyObj.style.borderBottom="none";
    leftDivbodyObj.style.backgroundColor="white";
    leftDivbodyObj.style.fontSize="10pt";
    leftDivbodyObj.style.paddingTop="5px";
    leftDivbodyObj.innerHTML="<img src='http://qq.jutoo.net/Image/kzx.bmp' width='111px' height='16px'/><br><img src='http://qq.jutoo.net/Image/klx.bmp' width='111px' height='16px'/><br><a href='#' style='text-decoration:none;color:black' οnclick="+"javascript:window.open(encodeURI('http://qq.jutoo.net/LeaveWord.aspx?wzid=12345&bumen=在线客服'),'','width=650px,height=455px,resizable=yes')"+"><img src='http://qq.jutoo.net/Image/offline.ico' border='0' width='10px' height='10px' style='margin:8px 0 8px 0' align='absmiddle'>在线客服<img src='http://qq.jutoo.net/Image/offline.gif' border='0'></a><br><a href='#' style='text-decoration:none;color:black' οnclick="+"javascript:window.open(encodeURI('http://qq.jutoo.net/LeaveWord.aspx?wzid=12345&bumen=技术部'),'','width=650px,height=455px,resizable=yes')"+"><img src='http://qq.jutoo.net/Image/offline.ico' border='0' width='10px' height='10px' style='margin:8px 0 8px 0' align='absmiddle'>技术部<img src='http://qq.jutoo.net/Image/offline.gif' border='0'></a><br>";//
    leftDivObj.appendChild(leftDivbodyObj);
   
    //左边div低部
    var leftDivfootObj=document.createElement("div");
    leftDivfootObj.style.width="117px";
    leftDivfootObj.style.height="11px";
    leftDivfootObj.style.overflow="hidden";
    leftDivfootObj.style.backgroundImage="url("+thurl+"Image/leftd.gif)";
   
    leftDivObj.appendChild(leftDivfootObj);
    //2个按钮外层的div
    ndiv1=document.createElement("div");
    ndiv1.style.position="absolute";
    ndiv1.style.left="120px";
    ndiv1.style.top="120px";
    ndiv1.style.width="300px";
    ndiv1.style.height="30px";
    ndiv1.style.cursor="pointer";
    ndiv1.align="center";
   
    centerdivObj.appendChild(ndiv1);
   
    ndiv1.innerHTML="<a href='#' οnclick="+"javascript:document.getElementById('cd_id').style.visibility='hidden';window.open(encodeURI('http://qq.jutoo.net/LeaveWord.aspx?wzid=12345&bumen=在线客服'),'','width=650px,height=455px,resizable=yes')"+"><img src='http://qq.jutoo.net/Image/ly.bmp' border='0'></a>&nbsp;";
   
    var xxbutton=document.createElement("input");
    xxbutton.type="image";
    xxbutton.src=thurl+"Image/xx.bmp";
    xxbutton.οnclick=function()
    {
        centerdivObj.style.visibility="hidden";
        window.open(encodeURI(thurl + "HandSetNote.aspx?wzid=" + wzId),"","width=650px,height=455px,resizable=yes");
    };
   
    ndiv1.appendChild(xxbutton);
   
    var kgtext=document.createTextNode(" ");
   
    ndiv1.appendChild(kgtext);
   
    var callbutton=document.createElement("input");
    callbutton.type="image";
    callbutton.src=thurl+"Image/dh.bmp";
    callbutton.οnclick=function()
    {
        centerdivObj.style.visibility="hidden";
        window.open(encodeURI(thurl + "TelCall.aspx?wzid=" + wzId),"","width=650px,height=455px,resizable=yes");
    };
   
    ndiv1.appendChild(callbutton);
   
    ndiv2=document.createElement("div");
    ndiv2.style.position="absolute";
    ndiv2.style.left="140px";
    ndiv2.style.top="50px";
    ndiv2.style.width="260px";
    ndiv2.style.height="60px";
    ndiv2.innerHTML="<font style='font-size:10pt'>欢迎您光临!请您给 在线客服 留言。</font>";
   
    centerdivObj.appendChild(ndiv2);
   
    ndiv3=document.createElement("div");
    ndiv3.style.position="absolute";
    ndiv3.style.left="420px";
    ndiv3.style.top="5px";
    ndiv3.style.width="20px";
    ndiv3.style.height="20px";
    ndiv3.innerHTML="<font color='white'>X</font>";
    ndiv3.style.cursor="pointer";
    ndiv3.οnclick=function()
    {
        centerdivObj.style.visibility="hidden";
    };
    centerdivObj.appendChild(ndiv3);
   
    //div的滚动
    var divtop=centerdivObj.style.top.replace("px","")-0;
    var thdivtop=leftDivObj.style.top.replace("px","")-0;
    var leftmintop=leftDivMinObj.style.top.replace("px","")-0;
   
    window.οnscrοll=function()
    {
        if(document.compatMode=="CSS1Compat")
        {
            centerdivObj.style.top=document.documentElement.scrollTop+divtop+"px";  //有 dtd 用这个
            leftDivObj.style.top=document.documentElement.scrollTop+thdivtop+"px";
            leftDivMinObj.style.top=document.documentElement.scrollTop+leftmintop+"px";
        }   
        else if(document.compatMode=="BackCompat")
        {
            centerdivObj.style.top=document.body.scrollTop+divtop+"px";   //没有 dtd 用这个
            leftDivObj.style.top=document.body.scrollTop+thdivtop+"px";
            leftDivMinObj.style.top=document.body.scrollTop+leftmintop+"px"
        }
    };
   
    centerdivObj.οnmοusedοwn=divMouseDown;
    centerdivObj.οnmοusemοve=function(){divMouseMove(getWindowEvent(getWindowEvent))};
    centerdivObj.οnmοuseup=divMouseUp;
}

function divMouseDown()
{
    isMouseDown=true;
}

function divMouseMove(e)
{
    if(isMouseDown)
    {
        if(window.navigator.appName.toLowerCase()=="microsoft internet explorer")
            centerdivObj.setCapture();
       
        var mouseX=e.clientX;
        var mouseY=e.clientY;

        var divLeft=centerdivObj.style.left.replace("px","")-0;
        var divTop=centerdivObj.style.top.replace("px","")-0;
       
        if(isFirst)  //第一次取
        {
            kjX=mouseX-divLeft;
            kjY=mouseY-divTop;
           
            isFirst=false;
        }

        centerdivObj.style.left=mouseX-kjX+"px";
        centerdivObj.style.top=mouseY-kjY+"px"
    }
}

function divMouseUp()
{
    isMouseDown=false;
    isFirst=true;
   
    if(window.navigator.appName.toLowerCase()=="microsoft internet explorer")
        centerdivObj.releaseCapture();
}

function createDivObj()
{
    centerdivObj=document.createElement("div");
}

createDiv();

function getWindowEvent(methodName)
{
    if(document.all)
        return window.event;
    else
        return methodName.caller.arguments[0];
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/389014.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

决策树有框架吗_决策框架

决策树有框架吗In a previous post, I mentioned that thinking exhaustively is exhausting! Volatility and uncertainty are ever present and must be factored into our decision making — yet, we often don’t have the time or data to properly account for it.在上一…

凑个热闹-LayoutInflater相关分析

前言 最近给组内同学做了一次“动态换肤和换文案”的主题分享&#xff0c;其中的核心就是LayoutInflater类&#xff0c;所以把LayoutInflater源码梳理了一遍。巧了&#xff0c;这周掘金新榜和部分公众号都发布了LayoutInflater或者换肤主题之类的文章。那只好站在各位大佬的肩膀…

ASP.NET Core文件上传、下载与删除

首先我们需要创建一个form表单如下: <form method"post" enctype"multipart/form-data" asp-controller"UpLoadFile" asp-action"FileSave"> <div> <div> <p>Form表单多个上传文件:</p> <input type…

8 一点就消失_消失的莉莉安(26)

文|明鸢Hi&#xff0c;中午好&#xff0c;我是暖叔今天是免费连载《消失的莉莉安》第26章消失的莉莉安▶▶往期链接&#xff1a;▼ 向下滑动阅读1&#xff1a;“消失的莉莉安(1)”2&#xff1a; 消失的莉莉安(2)3&#xff1a;“消失的莉莉安(3)”4&#xff1a;“消失的莉莉安…

透明的WinForm窗体

this.Location new System.Drawing.Point(100, 100); this.Cursor System.Windows.Forms.Cursors.Hand; // 定义在窗体上&#xff0c;光标显示为手形 this.Text "透明的WinForm窗体&#xff01;"; // 定义窗体的标题…

mysql那本书适合初学者_3本书适合初学者

mysql那本书适合初学者为什么要书籍&#xff1f; (Why Books?) The internet is a treasure-trove of information on a variety of topics. Whether you want to learn guitar through Youtube videos or how to change a tire when you are stuck on the side of the road, …

junit与spring-data-redis 版本对应成功的

spring-data-redis 版本:1.7.2.RELEASE junit 版本:4.12 转载于:https://www.cnblogs.com/austinspark-jessylu/p/9366863.html

语音对话系统的设计要点与多轮对话的重要性

这是阿拉灯神丁Vicky的第 008 篇文章就从最近短视频平台的大妈与机器人快宝的聊天说起吧。某银行内&#xff0c;一位阿姨因等待办理业务的时间太长&#xff0c;与快宝机器人展开了一场来自灵魂的对话。对于银行工作人员的不满&#xff0c;大妈向快宝说道&#xff1a;“你们的工…

c读取txt文件内容并建立一个链表_C++链表实现学生信息管理系统

可以增删查改&#xff0c;使用链表存储&#xff0c;支持排序以及文件存储及数据读取&#xff0c;基本可以应付期末大作业&#xff08;狗头&#xff09; 界面为源代码为一个main.cpp和三个头文件&#xff0c;具体为 main.cpp#include <iostream> #include <fstream>…

注册表启动

public void SetReg() { RegistryKey hklmRegistry.LocalMachine; RegistryKey runhklm.CreateSubKey("Software/Microsoft/Windows/CurrentVersion/Run"); //定义hklm指向注册表的LocalMachine,对注册表的结构&#xff0c;可以在windows的运行里&#…

阎焱多少身价_2020年,数据科学家的身价是多少?

阎焱多少身价Photo by Christine Roy on Unsplash克里斯汀罗伊 ( Christine Roy) 摄于Unsplash Although we find ourselves in unprecedented times of uncertainty, current events have shown just how valuable the fields of Data Science and Computer Science truly are…

Django模型定义参考

字段 对字段名称的限制 字段名不能是Python的保留字&#xff0c;否则会导致语法错误字段名不能有多个连续下划线&#xff0c;否则影响ORM查询操作Django模型字段类 字段类说明AutoField自增ID字段BigIntegerField64位有符号整数BinaryField存储二进制数据的字段&#xff0c;对应…

精通Quartz-入门-Job

JobDetail实例&#xff0c;并且&#xff0c;它通过job的类代码引用这个job来执行。每次调度器执行job时&#xff0c;它会在调用job的execute(..)方法之前创建一个他的实例。这就带来了两个事实&#xff1a;一、job必须有一个不带参数的构造器&#xff0c;二、在job类里定义数据…

单据打印_Excel多功能进销存套表,自动库存单据,查询打印一键操作

Hello大家好&#xff0c;我是帮帮。今天跟大家分享一张Excel多功能进销存管理套表&#xff0c;自动库存&#xff0c;单据打印&#xff0c;查询统算一键操作。为了让大家能更稳定的下载模板&#xff0c;我们又开通了全新下载方式(见文章末尾)&#xff0c;以便大家可以轻松获得免…

卡尔曼滤波滤波方程_了解卡尔曼滤波器及其方程

卡尔曼滤波滤波方程Before getting into what a Kalman filter is or what it does, let’s first do an exercise. Open the google maps application on your phone and check your device’s current location.在了解什么是卡尔曼滤波器或其功能之前&#xff0c;我们先做一个…

js中的new()到底做了些什么??

要创建 Person 的新实例&#xff0c;必须使用 new 操作符。以这种方式调用构造函数实际上会经历以下 4个步骤&#xff1a;(1) 创建一个新对象&#xff1b;(2) 将构造函数的作用域赋给新对象&#xff08;因此 this 就指向了这个新对象&#xff09; &#xff1b;(3) 执行构造函数…

Candidate sampling:NCE loss和negative sample

在工作中用到了类似于negative sample的方法&#xff0c;才发现我其实并不了解candidate sampling。于是看了一些相关资料&#xff0c;在此简单总结一些相关内容。 主要内容来自tensorflow的candidate_sampling和卡耐基梅隆大学一个学生写的一份notesNotes on Noise Contrastiv…

golang key map 所有_Map的底层实现 为什么遍历Map总是乱序的

Golang中Map的底层结构其实提到Map&#xff0c;一般想到的底层实现就是哈希表&#xff0c;哈希表的结构主要是Hashcode 数组。存储kv时&#xff0c;首先将k通过hashcode后对数组长度取余&#xff0c;决定需要放入的数组的index当数组对应的index已有元素时&#xff0c;此时产生…

朴素贝叶斯分类器 文本分类_构建灾难响应的文本分类器

朴素贝叶斯分类器 文本分类背景 (Background) Following a disaster, typically you will get millions and millions of communications, either direct or via social media, right at the time when disaster response organizations have the least capacity to filter and…

第二轮冲次会议第六次

今天早上八点我们进行了站立会议 此次站立会议我们开了30分钟 参加会议的人员&#xff1a; 黄睿麒 侯熙磊 会议内容&#xff1a;我们今天讨论了如何分离界面&#xff0c;是在显示上进行限制从而达到不同引用展现不同便签信息&#xff0c;还是单独开一个界面从而实现显示不同界面…