⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 0117.htm

📁 最全的JS大全,希望大家喜欢.收录于网络.收录于网络.最全的JS大全,希望大家喜欢.
💻 HTM
字号:
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- saved from url=(0032)http://www.ie-zone.com/index.php --><HTML><!-- #BeginTemplate "/Templates/JsExample.dwt" --><HEAD><!-- #BeginEditable "doctitle" --> <TITLE>渐变色条</TITLE><!-- #EndEditable --><META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK  href="fav.ico" rel="shortcut icon"><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){ob.select();js=ob.createTextRange();js.execCommand("Copy");}//--></SCRIPT><META content="MSHTML 5.50.4134.600" name=GENERATOR></HEAD><BODY id=all text=#000000 bgColor=#336699><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>  <TR bgColor=#ffffff>     <TD><IMG src="../images/sq_1.gif" width=11 height="14"></TD>    <TD width="100%"></TD>    <TD><IMG src="../images/sq_2.gif"    width=11 height="14"></TD>  </TR></TABLE><!-- #BeginEditable "Example%20and%20Sources" --> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>  <TR bgColor=#ffffff>     <TD><IMG src="../images/space.gif" width=11 height="1"></TD>    <TD width="100%">       <table width="100%" border="0" cellpadding="8">        <tr>           <td align="center"><!-- #BeginLibraryItem "/Library/js_title.lbi" --><script language="JavaScript">document.write("<font color=#7d070c style=\"font-size: 14px\">"+document.title+"</font>");</script><!-- #EndLibraryItem --></td>        </tr>        <tr>           <td bgcolor="#f7f7f7">             <script language="JavaScript">function prefix(s) {  // Make sure the hex# is 2 characters  if (1==s.length)    s="0"+s  return s}function breakApart(start) {  // Split the hex # into the RGB components  var temp = new Array()  temp[0] = parseInt(start.substring(0,2),16)  temp[1] = parseInt(start.substring(2,4),16)  temp[2] = parseInt(start.substring(4,6),16)  return temp}function diffParts(startInt, endInt, steps) {  // Determine the increment amount for each step  var temp = new Array()  for (var i=0; i<3; i++)    temp[i] = Math.round((endInt[i] - startInt[i]) / steps)  return temp}function createHR(start, end, steps, width, height) {  var startInt = breakApart(start)  var endInt = breakApart(end)  var stepList = diffParts(startInt, endInt, steps)  str = "<TABLE width="+width + " height="+height  var alignment = arguments[7] // Optional alignment argument  if (null!=alignment) {    alignment.toLowerCase()    // Ignore values other than left, right, and center    if ("left"==alignment)      str+=" align=left"    else if ("right"==alignment)      str+=" align=right"    else if ("center"==alignment)      str+=" align=center"  }  str+=" cellspacing=0 cellpadding=0 border=0><TR>"  for (var r=0; r < steps; r++) {      var hr = prefix(startInt[0].toString(16))      var hg = prefix(startInt[1].toString(16))      var hb = prefix(startInt[2].toString(16))      // increment color      for (var i=0; i < 3; i++)        startInt[i]+=stepList[i]      str+="<TD BGCOLOR="+hr + hg + hb+">"      // Cross-browser version      // Make sure to point the image to a valid      // location on your server      if (arguments[5]==true) str+="<IMG SRC='../../gifs/s.gif' WIDTH=1 HEIGHT=1>"      str+="</TD>"      // Vertical rule      if ((arguments[6]==true) && (r < steps-1))        str+="<TR>"  }  str+="</TABLE>"  return str}</script>            看到彩色的色带吗?很Cool哦.             <script language="">t1=createHR("00FF00","FF00FF",32,"50%",3, true)t2=createHR("CCFF00","FF00CC",16,32,16, true)t3=createHR("FF0000","FFFFFF",32,5,150, true, true, "left") t4=createHR("FFFFFF","0000FF",32,5,150, true, true, "right") t5=createHR("FFAA00","AA00EE",32,100,8, true, false, "center") t6=createHR("00FFFF","FF00FF",32,32,32, true, true)   document.write(t1)  document.write(t2)  document.write(t3)  document.write(t4)  document.write(t5)  document.write(t6)</script>          </td>        </tr>        <tr>           <td>1.将下面的代码复制到&lt;body&gt;内             <input type="button" name="Button" value="复制到我的剪贴板" onClick=JM_cc(js_1)>            <br>            <textarea name="js_1" wrap="VIRTUAL" cols="80" rows="10"><script language="JavaScript">function prefix(s) {  // Make sure the hex# is 2 characters  if (1==s.length)    s="0"+s  return s}function breakApart(start) {  // Split the hex # into the RGB components  var temp = new Array()  temp[0] = parseInt(start.substring(0,2),16)  temp[1] = parseInt(start.substring(2,4),16)  temp[2] = parseInt(start.substring(4,6),16)  return temp}function diffParts(startInt, endInt, steps) {  // Determine the increment amount for each step  var temp = new Array()  for (var i=0; i<3; i++)    temp[i] = Math.round((endInt[i] - startInt[i]) / steps)  return temp}function createHR(start, end, steps, width, height) {  var startInt = breakApart(start)  var endInt = breakApart(end)  var stepList = diffParts(startInt, endInt, steps)  str = "<TABLE width="+width + " height="+height  var alignment = arguments[7] // Optional alignment argument  if (null!=alignment) {    alignment.toLowerCase()    // Ignore values other than left, right, and center    if ("left"==alignment)      str+=" align=left"    else if ("right"==alignment)      str+=" align=right"    else if ("center"==alignment)      str+=" align=center"  }  str+=" cellspacing=0 cellpadding=0 border=0><TR>"  for (var r=0; r < steps; r++) {      var hr = prefix(startInt[0].toString(16))      var hg = prefix(startInt[1].toString(16))      var hb = prefix(startInt[2].toString(16))      // increment color      for (var i=0; i < 3; i++)        startInt[i]+=stepList[i]      str+="<TD BGCOLOR="+hr + hg + hb+">"      // Cross-browser version      // Make sure to point the image to a valid      // location on your server      if (arguments[5]==true) str+="<IMG SRC='../../gifs/s.gif' WIDTH=1 HEIGHT=1>"      str+="</TD>"      // Vertical rule      if ((arguments[6]==true) && (r < steps-1))        str+="<TR>"  }  str+="</TABLE>"  return str}</script></textarea>            <br>            <br>            2.生成参数<br>            createHR(startColor, endColor, steps, width, height <br>            [, crossBrowser, direction [, align ]]])<br>            startColor:开始的颜色; endColor:结束的颜色,steps:渐变的阶数;width:色带的长度;height:色带的宽;crossBrower:跨越浏览器;direction:方向<br>            <br>            下面是本页用的参数例子<br>            t1=createHR(&quot;00FF00&quot;,&quot;FF00FF&quot;,32,&quot;50%&quot;,3,             true)<br>            t2=createHR(&quot;CCFF00&quot;,&quot;FF00CC&quot;,16,32,16, true)<br>            t3=createHR(&quot;FF0000&quot;,&quot;FFFFFF&quot;,32,5,150, true,             true, &quot;left&quot;) <br>            t4=createHR(&quot;FFFFFF&quot;,&quot;0000FF&quot;,32,5,150, true,             true, &quot;right&quot;) <br>            t5=createHR(&quot;FFAA00&quot;,&quot;AA00EE&quot;,32,100,8, true,             false, &quot;center&quot;) <br>            t6=createHR(&quot;00FFFF&quot;,&quot;FF00FF&quot;,32,32,32, true,             true) <br>            document.write(t1)<br>            document.write(t2)<br>            document.write(t3)<br>            document.write(t4)<br>            document.write(t5)<br>            document.write(t6) <br>          </td>        </tr>      </table>    </TD>    <TD><IMG src="../images/space.gif"    width=11 height="1"></TD>  </TR></TABLE><!-- #EndEditable --><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>  <TR bgColor=#ffffff>     <TD><IMG src="../images/sq_3.gif" width=11 height="14"></TD>    <TD width="100%"></TD>    <TD><IMG src="../images/sq_4.gif"    width=11 height="14"></TD>  </TR></TABLE></BODY><!-- #EndTemplate --></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -