点击文字弹出一个DIV层窗口代码

来源:互联网 发布:淘宝兼职刷单 编辑:程序博客网 时间:2024/06/06 01:44
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <title>点击文字弹出一个DIV层窗口代码</title>
        <style>
        .black_overlay{
            display: none;
            position: absolute;
            top: 0%;
            left: 0%;
            width: 100%;
            height: 100%;
            background-color: black;
            z-index:1001;
            -moz-opacity: 0.8;
            opacity:.80;
            filter: alpha(opacity=88);
        }
        .white_content {
            display: none;
            position: absolute;
            top: 25%;
            left: 25%;
            width: 55%;
            height: 55%;
            padding: 20px;
            border: 10px solid orange;
            background-color: white;
            z-index:1002;
            overflow: auto;
        }
    </style>
    </head>
    <body>
    <DIV id=divStayTopCenter style="RIGHT: 70px; POSITION: absolute; TOP: 70px"><marquee width="60" behavior="alternate" scrollamount="0"><a title="点击查看详细内容!" href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">CLICK >></a><script language="JavaScript">
<!-- Begin
text = "点点看看!!" ; //显示的文字
color1 = "#333333"; //文字的颜色
color2 = "#cccccc"; //转换的颜色
fontsize = "2"; //字体大小
speed = 100; //转换速度 (1000 = 1 秒)
i = 0;
if (navigator.appName == "Netscape") {
document.write("<layer id=a visibility=show></layer><br><br><br>");
}
else {
document.write("<div id=a></div>");
}
function changeCharColor() {
if (navigator.appName == "Netscape") {
document.a.document.write("<center><font face=arial size =" + fontsize + "><font color=" + color1 +
">");
for (var j = 0; j < text.length; j++) {
if(j == i) {
document.a.document.write("<font face=arial color=" + color2 + ">" + Text.charAt(i) + "</font>");
}
else {
document.a.document.write(text.charAt(j));
}
}
document.a.document.write('</font></font></center>');
document.a.document.close();
}
if (navigator.appName == "Microsoft Internet Explorer") {
str = "<center><font face=arial size=" + fontsize + "><font color=" + color1 + ">";
for (var j = 0; j < text.length; j++) {
if( j == i) {
str += "<font face=arial color=" + color2 + ">" + text.charAt(i) + "</font>";
}
else {
str += text.charAt(j);
}
}
str += "</font></font></center>";
a.innerHTML = str;
}
(i == text.length) ? i=0 : i++;
}
setInterval("changeCharColor()", speed);
// End -->
</script>
</marquee>
</DIV>
        <div id="light" class="white_content"><P align=center><a title="QQ留言" href="tencent://message/?uin=779314927"><img alt="点击一下,与我在线交谈!"  src="http://wpa.qq.com/pa?p=1:779314927:6" border="0" /></a>  <a href="#note"><img title="本站留言" src="http://fs01.bokee.net/userfilespace/2009/04/07/lygt6661666284_s.gif" border="0" alt="点击一下,与我在线交谈!" /></a><P><CENTER><img height="10"   width="30" src="http://www.lygt999.com/dfj/01/new_09.gif" /><a title="最新研发的液压式、螺旋式、自动、半自动系列电焊条生产设备,吸取国内外众多电焊条生产线的优点,进行优化组合以繁化简,独家采用大范围多角度送丝调节器,使送丝张力及角度的调节更方便、快捷、准确;所有设备均无需配备压团机,节约了投资,独家设计的全自动焊条输送机集磨头、扫尾、印字于一体,一次性完成,扫尾规则,磨头精确。"   target=_blank  href="http://www.lygt666.com/"><font color="#00ff00">岗泰电焊条机械设备>></font></a></p>
<p><img height="10" width="30" src="http://www.lygt999.com/dfj/01/new_09.gif" /><a title="我厂生产的艺术围栏设备利用普通水泥,沙石为原料,经高速悬滚,一次成型,成本低,自动化程度高,简单易学,便于操控,使用寿命长,占地少,简易工棚即可安装."  target=_blank  href="http://www.lygt888.com/product.asp"><font color="#00ff00">岗泰牌艺术围栏设备>></font></a></p>
<p><img height="10" width="30" src="http://www.lygt999.com/dfj/01/new_09.gif" /><a title="岗泰带馅面条机,以全自动科技创新工艺,利用现代力学原理,对其传统功能进行更新,使面粉、馅料营养成分得以完美结合,在不改变功率的情况下产品大增,一机多用,出品率高,所产带馅面条花色多样,鲜嫩细滑,美味清香,洁净卫生。"  target=_blank  href="http://www.lygt999.com/mt/index_cn.asp"><font color="#00ff00">岗泰彩色带馅面条机>></font></a></p>
<p><img height="10" width="30" src="http://www.lygt999.com/dfj/01/new_09.gif" /><a title="全不锈钢制作功能最为齐全的流动无烟多功能小吃车! 这款集烧烤、油炸、涮烫、关东煮、铁板烧、酸辣粉等多种特色为一身的豪华型多功能无烟流动小吃车,可同时经营几个系列,上百个品种的各地特色风味小吃。"  target=_blank  href="http://www.lygt999.com/Index_cn.asp"><font color="#00ff00">岗泰牌多功能小吃车>></font></a></p>
<p><img height="10" width="30" src="http://www.lygt999.com/dfj/01/new_09.gif" /><a title="我厂设备特点:
 
     适用范围广:普通照明、动力电均可
     加热方式多:蒸汽加热和液化气加热皆可"  target=_blank  href="http://www.lygt999.com/dfj/index_cn.asp"><font color="#00ff00">岗泰七彩果蔬豆腐机>></font></a></p></CENTER> <P ALIGN=RIGHT><a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'"><font color="#ff0000">点这里关闭本窗口</font></a></P></div>
        <div id="fade" class="black_overlay"></div>
    </body>
</html>
原创粉丝点击