亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

關于在右下腳彈出窗口javascript代碼,并用ASP.

系統 1952 0
關于在右下腳彈出窗口javascript代碼,并用ASP.NET在后臺調用(原創)

關于在右下腳彈出窗口javascript代碼,并用ASP.NET在后臺調用(原創)

/*
構造函數,來初始化相應的屬性
*/
function PopBubble(caption,content,see){

this.content = content;
this.caption= caption;
this.see= see;
this.width= 150;
this.height = 120;
this.timeout= 150;
this.speed = 15;
this.step = 2;
this.right = screen.width -1;
this.bottom = screen.height;
this.left = this.right - this.width;
this.top= this.bottom - this.height;
this.timer = 0;
this.pause = false;
this.close = false;
this.autoHide = true;
}

/*
退宿彈出窗口的方法
*/
PopBubble.prototype.hide = function(){

var offset = this.height>this.bottom-this.top?this.height:this.bottom-this.top;
var obj = this;

if(this.timer>0){
window.clearInterval(obj.timer);
}

var fun = function(){
if(obj.pause==false||obj.close){
var x = obj.left;
var y = 0;
var width = obj.width;
var height = 0;

if(obj.offset>0){
height = obj.offset;
}
y = obj.bottom - height;
if(y>=obj.bottom){
window.clearInterval(obj.timer);
obj.Pop.hide();
} else {
obj.offset = obj.offset - obj.step;
}
obj.Pop.show(x,y,width,height);
}
}

this.timer = window.setInterval(fun,this.speed)


}

/*
實現查看超鏈接

*/
PopBubble.prototype.oncommand = function(){

window.parent.mainFrame.location.href="notReaderMessage.aspx";
this.close = true;
this.hide();
}

/*
顯示窗口中的div并彈出窗口方法
*/
PopBubble.prototype.show = function(){

var oPopup = window.createPopup();
this.Pop = oPopup;
var w = this.width;
var h = this.height;

var str = "<DIV style='BORDER-RIGHT: #455690 1px solid; BORDER-TOP: #a6b4cf 1px solid; Z-INDEX: 99999; LEFT: 0px; BORDER-LEFT: #a6b4cf 1px solid; WIDTH: " + w + "px; BORDER-BOTTOM: #455690 1px solid; POSITION: absolute; TOP: 0px; HEIGHT: " + h + "px; BACKGROUND-COLOR: #DAED9B'>"
str += "<TABLE style='BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid' cellSpacing=0 cellPadding=0 width='100%' bgColor=#EEF7CC border=0>"
str += "<TR>"
str += "<TD style='FONT-SIZE: 12px;COLOR: #0f2c8c' width=30 height=24></TD>"
str += "<TD style='PADDING-LEFT: 4px; FONT-WEIGHT: normal; FONT-SIZE: 12px; COLOR: #1f336b; PADDING-TOP: 4px' vAlign=center width='100%'>" + this.caption + "</TD>"

str += "</TR>"
str += "<TR>"
str += "<TD style='PADDING-RIGHT: 1px;PADDING-BOTTOM: 1px' colSpan=2 height=" + (h-28) + ">"
str += "<DIV style='BORDER-RIGHT: #b9c9ef 1px solid; PADDING-RIGHT: 8px; BORDER-TOP: #7AA14E 1px solid; PADDING-LEFT: 8px; FONT-SIZE: 12px; PADDING-BOTTOM: 8px; BORDER-LEFT: #7AA14E 1px solid; WIDTH: 100%; COLOR: #1f336b; PADDING-TOP: 8px; BORDER-BOTTOM: #b9c9ef 1px solid; HEIGHT: 100%'>" + this.content + "<BR><BR>"
str += "<DIV style='WORD-BREAK: break-all' align=left><A href='javascript:void(0)' hidefocus=true id='btCommand'><FONT color=#ff0000>" + this.see+"<embed id='soundControl' src='Windows.wav' mastersound hidden='true' loop='false' autostart='true'></embed>" + "</FONT></A></DIV>"
str += "</DIV>"
str += "</TD>"
str += "</TR>"
str += "</TABLE>"
str += "</DIV>"
oPopup.document.body.innerHTML = str;


this.offset = 0;
var obj = this;
oPopup.document.body.onmouseover = function(){obj.pause=true;}
oPopup.document.body.onmouseout = function(){obj.pause=false;}

var fun = function(){
var x = obj.left;
var y = 0;
var width = obj.width;
var height = obj.height;

if(obj.offset>obj.height){
height = obj.height;
} else {
height = obj.offset;
}
y = obj.bottom - obj.offset;
if(y<=obj.top){
obj.timeout--;
if(obj.timeout==0){
window.clearInterval(obj.timer);
if(obj.autoHide){
obj.hide();
}
}
}
else {
obj.offset = obj.offset + obj.step;
}
obj.Pop.show(x,y,width,height);

}
this.timer = window.setInterval(fun,this.speed)
var btCommand = oPopup.document.getElementById("btCommand");
btCommand.onclick = function(){
obj.oncommand();
}
}

PopBubble.prototype.rect = function(left,right,top,bottom){
try {
this.left= this.right-this.width;
this.right=this.left +this.width;
this.bottom = screen.height;
this.top = this.bottom - this.height;
} catch(e){}
}

在后臺VS2008下用ASP.NET下用ScriptManager.RegisterClientScriptBlock(UpdatePanel1, this.GetType(), "", "var msg = new PopBubble('短消息提示:','您有" + isRead + "封未讀消息','查看'); msg.show();", true);

方式調用,完全成功,

測試圖如下


關于在右下腳彈出窗口javascript代碼,并用ASP.NET在后臺調用(原創)


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 亚洲精美视频 | 天天干天天色综合网 | 狠狠色噜噜狠狠狠狠97 | 日韩综合在线 | 久久综合玖玖爱中文字幕 | 久久精品国产视频在热 | 视频黄在线观看 | 久久精品国产免费一区 | 国产亚洲精品久久久久91网站 | 午夜看一级特黄a大片 | 欧美激情在线播放一区二区 | 国产欧美日韩高清专区手机版 | 一级特级欧美午夜片免费观看 | 亚洲精品综合一区二区三区 | 久久国产亚洲精品麻豆 | a毛片免费在线观看 | 国产成人综合精品 | 欧美国产日韩911在线观看 | 亚洲黄色自拍 | 久久激情综合网 | 奇米四色在线视频 | 成人免费牛牛在线视频 | va亚洲va日韩不卡在线观看 | 夜夜做夜夜爽 | 国产精品第1页在线播放 | 一级成人a免费视频 | 国产成人精品久久二区二区 | 国内精品一区二区三区最新 | 国产一级淫片a免费播放口欧美 | 农村妇女高清毛片一级 | 国产一级精品视频 | 九九影院理论片在线观看 | 新久草| 成人精品视频在线 | 精品国产乱码一区二区三区麻豆 | 色片免费观看 | 热久久精品 | 四虎国产精品免费久久麻豆 | 看黄网站在线观看 | 天天舔天天干天天操 | 国产精品成人不卡在线观看 |