欢迎光临

木子屋

标题: 一个不错的alert效果

作者: dnawo

日期: 2007-04-24 08:55 AM

分类: 脚本语言

内容: HTML代码
你可以拖动我吗？
\n";
strHtml += "[提示……]\n";
strHtml += ""+txt+"\n";
strHtml += "\n";
strHtml += "\n";
alertFram.innerHTML = strHtml;
document.body.appendChild(alertFram);
document.body.appendChild(shield);
var c = 0;
this.doAlpha = function(){
if (c++ > 50){clearInterval(ad);return 0;}
shield.style.filter = "alpha(opacity="+c+");";
}
this.remove=function(){
alertFram.innerHTML="";
shield.style.filter = "";
shield.id = "";
shield.style.position = "";
shield.style.left = "";
shield.style.top = "";
shield.style.width = "";
shield.style.height ="";
shield.style.background = "";
shield.style.textAlign = "";
shield.style.zIndex = "";
shield.style.filter = "";
alertFram.id="";
alertFram.style.position = "";
alertFram.style.left = "";
alertFram.style.top = "";
alertFram.style.marginLeft = "";
alertFram.style.marginTop = "";
alertFram.style.width = "";
alertFram.style.height = "";
alertFram.style.background = "";
alertFram.style.textAlign = "";
alertFram.style.lineHeight = "";
alertFram.style.zIndex = "";
}
var ad = setInterval("doAlpha()",10);
alertFram.focus();
document.body.onselectstart = function(){return false;};
}
function oMove(obj){
var otop,oleft;
otop = event.y - obj.offsetTop;
oleft = event.x - obj.offsetLeft;
obj.setCapture();
obj.onmousemove = function()
{
obj.style.left = event.x - oleft;
obj.style.top = event.y - otop;
}
obj.onmouseup = function()
{
obj.onmousemove = null;
obj.style.filter = null;
obj.releaseCapture();
}
}
//-->

[Ctrl+A 全部选择 提示：你可先修改部分代码，再按运行]

+ 查看当前日志评论 (0)

登录

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 0.688 ms

返回

标题: 一个不错的alert效果

你没有权限发表评论

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 0.688 ms

返回

暂无评论

返回

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 0.719 ms

返回