简易js节日鼠标经过切换提示信息效果

2个月前 (02-26 13:41)阅读61回复0
大陆
大陆
  • 管理员
  • 发消息
  • 注册排名1
  • 经验值4189
  • 级别管理员
  • 主题837
  • 回复2
楼主

鼠标经过时切换提示信息效果,常用于网站节日提示功能,自己添加判断条件,常用的鼠标感应弹出提示信息特效。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren">
<meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。">
<title>简易js节日鼠标经过切换提示信息效果_武鸣人</title>
<style> 
body,ul,li,h2,p{margin:0;padding:0;}
body{font:12px/1.5 Tahoma;}
#calen_wuming_ren{width:248px;overflow:hidden;zoom:1;background:#eaeaea;margin:10px auto;padding:0 0 10px 10px;}
#calen_wuming_ren ul{overflow:hidden;zoom:1;}
#calen_wuming_ren li{color:#fff;float:left;width:40px;height:40px;cursor:pointer;font-size:14px;text-align:center;background:#424242;line-height:1.3;list-style-type:none;border:1px solid #424242;margin:10px 10px 0 0;padding:5px;}
#calen_wuming_ren li.current_wuming{color:#F69;background:#fff;}
#calen_wuming_ren li strong{display:block;font-size:18px;}
#msg{color:#666;background:#f1f1f1;border:1px solid #fff;margin:10px 10px 0 0;padding:5px;}
#msg h2{font-size:14px;}
</style>
<script> 
window.onload = function ()
{
var oLi = document.getElementById("calen_wuming_ren").getElementsByTagName("li");
var oMsg = document.getElementById("msg");
var oP = oMsg.getElementsByTagName("p")[0];
var oStrong = oMsg.getElementsByTagName("strong")[0];
var oArray = [
"元旦:1月1日至3日放假三天。",
"春节:2月2日至8日放假7天。",
"妇女节:3月8日妇女节,与我无关。",
"清明节:4月3日至5日放假3天",
"劳动节:4月30日至5月2日放假3天。",
"端午节:6月4日至6日放假3天。",
"小暑:7月7日小暑。不放假。",
"七夕节:8月6日七夕节。不放假。",
"中秋节:9月10日至12日放假3天。",
"国庆节:10月1日至7日放假7天。",
"立冬:11月8日立冬。不放假。",
"艾滋病日:12月1日<br />废除奴隶制国际日:12月2日。"
];
for(var i = 0; i < oLi.length; i++)
{
oLi[i].index = i;
oLi[i].onmouseover = function ()
{
for(var n = 0; n < oLi.length; n++) oLi[n].className = "";
this.className = "current_wuming";
oP.innerHTML = oArray[this.index];
oStrong.innerHTML = this.index + 1;
}
}
}//武鸣人网站https://www.wuming.ren 网站域名很好记住,wuming.ren(武鸣拼音.ren域名后缀)
</script>
</head>
<body>
<a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr>
<!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。-->
<script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script>
<script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script>
<div id="calen_wuming_ren">
    <ul>
        <li><strong>1</strong>JAN</li>
        <li><strong>2</strong>FER</li>
        <li><strong>3</strong>MAR</li>
        <li><strong>4</strong>APR</li>
        <li><strong>5</strong>MAY</li>
        <li class="current_wuming"><strong>6</strong>JUN</li>
        <li><strong>7</strong>JUL</li>
        <li><strong>8</strong>AUG</li>
        <li><strong>9</strong>SEP</li>
        <li><strong>10</strong>OCT</li>
        <li><strong>11</strong>NOV</li>
        <li><strong>12</strong>DEC</li>
    </ul>
    <div id="msg">
        <h2>
            <strong>6</strong>
            月节日
        </h2>
        <p>端午节:6月4日至6日放假3天。</p>
    </div>
</div>
</body>
</html>


0
0
收藏0
回帖

简易js节日鼠标经过切换提示信息效果 期待您的回复!

取消
载入表情清单……
载入颜色清单……
插入网络图片

取消确定

图片上传中
编辑器信息
提示信息