设为首页  
联系我们  
加入收藏  
网页制作 冲浪宝典 图形图像 操作系统 软件教学 编程开发 认证考试 安全技术 站长专区 文学驿站 娱乐天地 游戏天地 办公软件
文章搜索
您的位置: 首页 >> 文章首页 >> 编程开发 >> 网站制作技术 >> 用3个滚动条控制bgcolor
精品推荐
网站制作技术点击TOP10
·网页打印问题,打印设置,打印预览,打印分页,纵打,横打及页面的边距
·Asp.net可输入下拉框服务器控件
·包过滤规则配置示例
·ISAPI_Rewrite Lite
·一个带搜索功能的网页原代码
·漂亮的日期选择器
·全角/半角的转换函数
·AWStats: Apache/IIS的日志分析工具——在GNU/Linux和Windows平台上的使用简介
·手把手教你如何免费注册国际顶级域名
·Do All in Cmd Shell
编程开发点击TOP10
·数字小键盘指法练习
·ASP.NET 程序中常用的三十三种代码
·用C语言编通讯录程序(初学者级别的)
·我写的Java学生成绩管理系统源代码
·CHK文件恢复工具
·Modem 常用AT指令集
·java笔试题
·异常java.sql.SQLException: Io exception:The Network Adapter could not establish connection
·单片机模拟I2C总线及24C02(I2C EEPROM)读写实例(源代码)
·C++经典电子书下载
精选专题

用3个滚动条控制bgcolor

作者: 来源:网络文章 时间:2005-12-17 23:27:02

CSdn.net/tempimgs/js/knob.jpeg">

原吗:

<STYLE type=text/CSS>BODY {
 MARGIN: 25px 25px 25px
}
#all TD {
 FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: "Verdana", "Arial","ÐÂËÎÌå", "ËÎÌå"
}
INPUT {
 FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: "Verdana", "Arial","ÐÂËÎÌå", "ËÎÌå"
}
SELECT {
 FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: "Verdana", "Arial","ÐÂËÎÌå", "ËÎÌå"
}
P {
 FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: "Verdana", "Arial","ÐÂËÎÌå", "ËÎÌå"
}
TEXTAREA {
 FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: "Verdana", "Arial","ÐÂËÎÌå", "ËÎÌå"
}

#all A:active {
 COLOR: #7d070c
}
#all A:visited {
 COLOR: #7d070c
}

#all A:hover {
 COLOR: #336699
}
#all A:link {
 COLOR: #7d070c
}
</STYLE>
<SCRIPT language=JavaScript>
<!--

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function JM_cc(ob){
var obj=MM_findObj(ob); if (obj) {
obj.select();js=obj.createTextRange();js.execCommand("Copy");}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
//-->
</SCRIPT>
<META content="Microsoft FrontPage 4.0" name=GENERATOR>
<style>.drag {
 CURSOR: hand; POSITION: relative
}
</style>
</HEAD>
<BODY id=all text=#000000 bgColor=#336699>
      <table width="100%" border="0" cellpadding="8" height="124">
        <tr>
          <td align="center" height="17">
          </td>
        </tr>
        <tr>
          <td bgcolor="#f7f7f7" height="71">
            <p>
              <script language=JavaScript1.2>
// Slider script by Ronald H. Jankowsky (http://rj-edv-beratung.de), parts of code (draglayer, movelayer) by DynamicDrive.com
// This script is free for use, please leave this notice intact
var sPosition;
var showPerc=100;
document.onmousedown=dragLayer
document.onmouseup=new Function("dragMe=false")

var Color= new Array();
Color[0] = "00";
Color[1] = "11";
Color[2] = "22";
Color[3] = "33";
Color[4] = "44";
Color[5] = "55";
Color[6] = "66";
Color[7] = "77";
Color[8] = "88";
Color[9] = "99";
Color[10] = "AA";
Color[11] = "BB";
Color[12] = "CC";
Color[13] = "DD";
Color[14] = "EE";
Color[15] = "FF";

// Demofunction to change bg-color by moving slider
var rVal,gVal,bVal, cCol
function chgBg() {
 cCol = document.bgColor; rVal=cCol.substr(1,2); gVal=cCol.substr(3,2); bVal=cCol.substr(5,2);
 ind = Math.round(showPerc/16); if (ind < 0) ind = 0; if (ind > 15) ind=15;
// If more sliders are used, each of them has to be handled separately
 if (kObj.id =="knobImg") document.bgColor="#"+Color[ind]+gVal+bVal;
 if (kObj.id =="knobImg1")  document.bgColor="#"+rVal+Color[ind]+bVal;
 if (kObj.id =="knobImg2")  document.bgColor="#"+rVal+gVal+Color[ind];
}

// Drag and move engine (original code by DynamicDrive.com), don't change unless explicitely indicated
var dragMe=false, kObj, yPos,direction
function moveLayer() {
if (event.button==1 && dragMe) {
 oldY = kObj.style.pixelTop; kObj.style.pixelTop=temp2+event.clientY-yPos;
// Limit movement of knob to stay inside layer
 if (kObj.style.pixelTop > oldY) direction="dn"; else direction="up";
 if (kObj.style.pixelTop < 2 && direction=="up") {kObj.style.pixelTop=2; direction="dn";}
 if (kObj.style.pixelTop > 102 && direction=="dn") {kObj.style.pixelTop=102; direction="up";}
// Set working variable 'showPerc' depending on 100 or 250 scaling
 sPosition=kObj.style.pixelTop; showPerc = (perCent[0].checked) ? sPosition-2 : (sPosition-2)/2*5;
// The following line should be replaced by the function-call with the actual task to perform
 chgBg();
 return false; }
}
function dragLayer() {
if (!document.all) return;
if (event.srcElement.className=="drag") {dragMe=true; kObj=event.srcElement; temp2=kObj.style.pixelTop; yPos=event.clientY; document.onmousemove=moveLayer; }
}
</script>
              Ìáʾ:ÕâÊÇÒ»¸öÑÕÉ«µÄµ÷½ÚÆ÷£¬ÏÖÔÚ±¾Àý×ÓÖ»¼òµ¥µÄ¸Ä±äÁ˱³¾°µÄÑÕÉ«£¬ÄãÍêÈ«¿ÉÒÔ½«ÕâʹÓ÷½·¨Ó&brVBar;Óõ½ÈçÁÄÌìÊÒµÄ×ÖÌåÑÕÉ«µÈ³ÌÐòÉÏ£¬¿ÉÒÔÈÃÄãµÄÓ¦ÓÃÔöÌíÉ«²Ê.<script language="JavaScript">
document.write("<font color=#7d070c style=\"font-size: 14px\">"+document.title+"</font>");
</script><input
type=radio value=false name=perCent>
              Prozent 
              <input type=radio CHECKED value=true 
name=perCent>
              255</p>
            <div id=outerLyr 
style="Z-INDEX: 1; LEFT: 233px; WIDTH: 23px; POSITION: absolute; TOP: 111px; HEIGHT: 120px; BACKGROUND-COLOR: #000000"><img 
class=drag id=knobImg 
style="Z-INDEX: 3; LEFT: 2px; WIDTH: 20px; TOP: 100px; HEIGHT: 17px" 
src="../tempimgs/js/knob.jpeg"> 
              <div id=innerLyr 
style="Z-INDEX: 2; LEFT: 2px; WIDTH: 20px; POSITION: absolute; TOP: 2px; HEIGHT: 117px; BACKGROUND-COLOR: #777777"> 
                <div id=barLyr 
style="Z-INDEX: 1; LEFT: 9px; WIDTH: 2px; POSITION: absolute; TOP: 5px; HEIGHT: 110px; BACKGROUND-COLOR: #000000"></div>
              </div>
            </div>
            <div id=outerLyr1 
style="Z-INDEX: 1; LEFT: 268px; WIDTH: 23px; POSITION: absolute; TOP: 111px; HEIGHT: 120px; BACKGROUND-COLOR: #000000"><img 
class=drag id=knobImg1 
style="Z-INDEX: 3; LEFT: 2px; WIDTH: 20px; TOP: 100px; HEIGHT: 17px" 
src="../tempimgs/js/knob.jpeg"> 
              <div id=innerLyr1 
style="Z-INDEX: 2; LEFT: 2px; WIDTH: 20px; POSITION: absolute; TOP: 2px; HEIGHT: 117px; BACKGROUND-COLOR: #777777"> 
                <div id=barLyr1 
style="Z-INDEX: 1; LEFT: 9px; WIDTH: 2px; POSITION: absolute; TOP: 5px; HEIGHT: 110px; BACKGROUND-COLOR: #000000"></div>
              </div>
            </div>
            <div id=outerLyr2 
style="Z-INDEX: 1; LEFT: 300px; WIDTH: 23px; POSITION: absolute; TOP: 111px; HEIGHT: 120px; BACKGROUND-COLOR: #000000"><img 
class=drag id=knobImg2 
style="Z-INDEX: 3; LEFT: 2px; WIDTH: 20px; TOP: 100px; HEIGHT: 17px" 
src="../tempimgs/js/knob.jpeg"> 
              <div id=innerLyr2 
style="Z-INDEX: 2; LEFT: 2px; WIDTH: 20px; POSITION: absolute; TOP: 2px; HEIGHT: 117px; BACKGROUND-COLOR: #777777"> 
                <div id=barLyr2 
style="Z-INDEX: 1; LEFT: 9px; WIDTH: 2px; POSITION: absolute; TOP: 5px; HEIGHT: 110px; BACKGROUND-COLOR: #000000"></div>
              </div>
              <!-- This would be a way to configure if slider range is 0-100 or 0-255 -->
            </div>
          </td>
        </tr>
      </table>

 


用3个滚动条控制bgcolor 相关文章:
用3个滚动条控制bgcolor 相关软件:
特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
转载请注明来源:http://www.xgdown.com