日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

jsforim

發布時間:2023/11/30 编程问答 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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];
}

總結

以上是生活随笔為你收集整理的jsforim的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。