非活动窗口,如何能“激活”~~谢谢了 用createPopup不过是IE only代码参考http://www.iamwinter.com/article.asp?id=53 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 贴段自己的代码/* 系统桌面提示类 */popup = function( msg ){this.create();this.setContent(msg);};popup.prototype = { create: function(){ this.win = window.createPopup(); this.doc= this.win.document; this.doc.defaultCharset= "utf-8"; this.maxHeight = 48; this.hideDelay = 8000; //5秒后关闭 }, setContent: function( msg ){ var html = '<div style="background:#ffffcc;border:1px solid black;padding:4px;font-family:verdana; font-size:70%; width:300px;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=\'#0099FF\', EndColorStr=\'#00FFFF\');">\ <h5 style="margin:4px;font-size:12px;padding:0">系统提示</h5>\ <div style="margin:4px;">' + msg + '</div></div>'; this.doc.body.innerHTML = html; }, setPosition: function(){ this.width = 300; this.height = 0; this.left = screen.availWidth - this.width - 20; this.top = screen.availHeight - this.height; }, show: function(){ this.setPosition(); this.moveup(); var self =this; setTimeout(function(){self.movedown()}, this.hideDelay ); }, hide: function(){ this.movedown(); }, moveup: function(){ if( this.height >= this.maxHeight ) clearTimeout( this.timer ); else { this.height += 2; this.top = screen.availHeight - this.height; this.win.show(this.left,this.top,this.width,this.height); var self = this; var f = function(){self.moveup()}; this.timer = setTimeout( f, 10 ); } }, movedown: function(){ if( this.height <= 0 ) clearTimeout( this.timer ); else { this.height -= 2; this.top = screen.availHeight - this.height; this.win.show(this.left,this.top,this.width,this.height); var self = this; var f = function(){self.movedown()}; this.timer = setTimeout( f, 10 ); } }}用法var msg = '有新的会员加入';MSPOP = new popup( msg );MSPOP.show(); WebRTC如何创建远程视频连接? 我刚学网页开发,我想问一下有经验的仁兄,能否实现以下效果? Html如何使用ExtJs 请高位过来看看,解释一下,新手问题 散分拉,新年快乐! 谁能帮我给DropDownList 加一个onMouseMove事件? 请教个打印的问题 如何用正则表达式,将e.innerHTML中"<br>" 替换成js 的换行 为什么具有编辑功能的iframe的获取的值一闪而过,不能固定呢??(关于html编辑器) 在线等待,请高手帮助,关于字号默认大小 怎样把这个正则表达式加上,只能输入10-50个字符。 请问这个JS文件怎么才能看到源代码?
popup = function( msg ){this.create();this.setContent(msg);};
popup.prototype = {
create: function(){
this.win = window.createPopup();
this.doc= this.win.document;
this.doc.defaultCharset= "utf-8";
this.maxHeight = 48;
this.hideDelay = 8000; //5秒后关闭
},
setContent: function( msg ){
var html = '<div style="background:#ffffcc;border:1px solid black;padding:4px;font-family:verdana; font-size:70%; width:300px;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=\'#0099FF\', EndColorStr=\'#00FFFF\');">\
<h5 style="margin:4px;font-size:12px;padding:0">系统提示</h5>\
<div style="margin:4px;">' + msg + '</div></div>';
this.doc.body.innerHTML = html;
},
setPosition: function(){
this.width = 300;
this.height = 0;
this.left = screen.availWidth - this.width - 20;
this.top = screen.availHeight - this.height;
},
show: function(){
this.setPosition();
this.moveup();
var self =this;
setTimeout(function(){self.movedown()}, this.hideDelay );
},
hide: function(){
this.movedown();
},
moveup: function(){
if( this.height >= this.maxHeight )
clearTimeout( this.timer );
else
{
this.height += 2;
this.top = screen.availHeight - this.height;
this.win.show(this.left,this.top,this.width,this.height);
var self = this;
var f = function(){self.moveup()};
this.timer = setTimeout( f, 10 );
}
},
movedown: function(){
if( this.height <= 0 )
clearTimeout( this.timer );
else
{
this.height -= 2;
this.top = screen.availHeight - this.height;
this.win.show(this.left,this.top,this.width,this.height);
var self = this;
var f = function(){self.movedown()};
this.timer = setTimeout( f, 10 );
}
}}用法
var msg = '有新的会员加入';
MSPOP = new popup( msg );
MSPOP.show();