500DB求网页定时更换背景色代码和完全禁止右键代码,急呀······

社区服务
高级搜索
猴岛论坛电脑百科500DB求网页定时更换背景色代码和完全禁止右键代码,急呀······
发帖 回复
倒序阅读 最近浏览的帖子最近浏览的版块
5个回复

[资源分享]500DB求网页定时更换背景色代码和完全禁止右键代码,急呀······

楼层直达
叶晏

ZxID:11457617

等级: 元老
举报 只看楼主 使用道具 楼主   发表于: 2010-10-06 0
html代码,知道的大大请详细的说一下,定时换背景色要的是在网页打开是是用的一个背景色,然后等几秒钟,网页背景色自动更换成了另一种背景色,然后就不变了,知道的电脑帝就麻烦你活动活动手指,把代码告诉我吧,谢谢了
留心留肺做什么.

ZxID:10917721

等级: 中尉
    使人成熟的不是时间,是经历.

举报 只看该作者 沙发   发表于: 2010-10-06 0
没有。
未滿十八歲╮

ZxID:6748612

等级: 禁止发言

举报 只看该作者 板凳   发表于: 2010-10-06 0
搞不懂。百度一下,你就知道
℡陌メ尐楓

ZxID:10371843

等级: 准尉

举报 只看该作者 地板   发表于: 2010-10-06 0
<style type="text/css">
<!--
.STYLE1 {
        font-size: 27px;
        color: #0000FF;
        font-weight: bold;
}
a:link {
        text-decoration: none;
}
a:visited {
        text-decoration: none;
}
a:hover {
        text-decoration: none;
}
a:active {
        text-decoration: none;
}
.STYLE8 {
        font-size: 36px;
        font-weight: bold;
        color: #0000FF;
}
.STYLE10 {font-size: 36px; color: #FF0000; font-weight: bold; }
.STYLE14 {font-family: "华文行楷"}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_controlSound(x, _sndObj, sndFile) { //v3.0
  var i, method = "", sndObj = eval(_sndObj);
  if (sndObj != null) {
    if (navigator.appName == 'Netscape') method = "play";
    else {
      if (window.MM_WMP == null) {
        window.MM_WMP = false;
        for(i in sndObj) if (i == "ActiveMovie") {
          window.MM_WMP = true; break;
      } }
      if (window.MM_WMP) method = "play";
      else if (sndObj.FileName) method = "run";
  } }
  if (method) eval(_sndObj+"."+method+"()");
  else window.location = sndFile;
}
//-->
</script>
</head>

<body  onLoad='setInterval ("BgFade()",20)'>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin

var i=0, bg=0, bgI=1, cNum=1;

var cArray = new Array(4);

var hex = new Array(30);

cArray[0]="66FF66";

cArray[1]="FF6600";

cArray[2]="3333FF";

cArray[3]="99FFFF";

cArray[4]="FFCC00";

hex[0]="00";

hex[1]="09";

hex[2]="11";

hex[3]="1A";

hex[4]="22";

hex[5]="2B";

hex[6]="33";

hex[7]="3C";

hex[8]="44";

hex[9]="4D";

hex[10]="55";

hex[11]="5E";

hex[12]="66";

hex[13]="6F";

hex[14]="77";

hex[15]="80";

hex[16]="88";

hex[17]="91";

hex[18]="99";

hex[19]="A2";

hex[20]="AA";

hex[21]="B3";

hex[22]="BB";

hex[23]="C4";

hex[24]="CC";

hex[25]="D5";

hex[26]="DD";

hex[27]="E6";

hex[28]="EE";

hex[29]="F7";

hex[30]="FF";



function BgFade() {

    if (cNum==1) {FadeRed();}

    else if (cNum==2) {FadeWhite();}

    else {FadeBlue();}

}



function FadeRed() {

    bg+=bgI;

    if (bg>29) {bgI*=-1;}

    else if (bg<1) {bgI*=-1;cNum=2;}

    document.body.bgColor="#"+hex[bg]+"0000";

}



function FadeWhite() {

    bg+=bgI;

    if (bg>29) {bgI*=-1;}

    else if (bg<1) {bgI*=-1;cNum=3;}

    document.body.bgColor="#"+hex[bg]+hex[bg]+hex[bg];

}



function FadeBlue() {

    bg+=bgI;

    if (bg>29) {bgI*=-1;}

    else if (bg<1) {bgI*=-1;cNum=1;}

    document.body.bgColor="#0000"+hex[bg];

}

//  End -->

</script>

这段是更换背景色的代码

我也不知道可以不 这是转的
[img]http://s8.hk/5hkb                                 


[/img]
℡陌メ尐楓

ZxID:10371843

等级: 准尉

举报 只看该作者 4楼  发表于: 2010-10-06 0
<script language="javascript">function click(){if (event.button==2){alert('禁止右击')}};document.onmousedown=click</script>

这段是禁止右键的!其中“禁止右击”几个字可以任意改的……
[img]http://s8.hk/5hkb                                 


[/img]
℡陌メ尐楓

ZxID:10371843

等级: 准尉

举报 只看该作者 5楼  发表于: 2010-10-06 0
咳咳  换背景的 不用这么麻烦 插入html代码中的<body>中
<body  onLoad='setInterval ("BgFade()",20)'>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin

var i=0, bg=0, bgI=1, cNum=1;

var cArray = new Array(4);

var hex = new Array(30);

cArray[0]="66FF66";

cArray[1]="FF6600";

cArray[2]="3333FF";

cArray[3]="99FFFF";

cArray[4]="FFCC00";

hex[0]="00";

hex[1]="09";

hex[2]="11";

hex[3]="1A";

hex[4]="22";

hex[5]="2B";

hex[6]="33";

hex[7]="3C";

hex[8]="44";

hex[9]="4D";

hex[10]="55";

hex[11]="5E";

hex[12]="66";

hex[13]="6F";

hex[14]="77";

hex[15]="80";

hex[16]="88";

hex[17]="91";

hex[18]="99";

hex[19]="A2";

hex[20]="AA";

hex[21]="B3";

hex[22]="BB";

hex[23]="C4";

hex[24]="CC";

hex[25]="D5";

hex[26]="DD";

hex[27]="E6";

hex[28]="EE";

hex[29]="F7";

hex[30]="FF";



function BgFade() {

    if (cNum==1) {FadeRed();}

    else if (cNum==2) {FadeWhite();}

    else {FadeBlue();}

}



function FadeRed() {

    bg+=bgI;

    if (bg>29) {bgI*=-1;}

    else if (bg<1) {bgI*=-1;cNum=2;}

    document.body.bgColor="#"+hex[bg]+"0000";

}



function FadeWhite() {

    bg+=bgI;

    if (bg>29) {bgI*=-1;}

    else if (bg<1) {bgI*=-1;cNum=3;}

    document.body.bgColor="#"+hex[bg]+hex[bg]+hex[bg];

}



function FadeBlue() {

    bg+=bgI;

    if (bg>29) {bgI*=-1;}

    else if (bg<1) {bgI*=-1;cNum=1;}

    document.body.bgColor="#0000"+hex[bg];

}

//  End -->

</script>
[img]http://s8.hk/5hkb                                 


[/img]
« 返回列表
发帖 回复