一些JS

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>MSND 滑出菜单</title>
<meta name="Generator" content="EditPlus">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<style>
.LocaleManagementFlyoutPopup {
font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
border:1px solid #666666;
padding: 3px 3px 3px 3px;
text-align: left;
background-color: #FFFFFF;
z-index: 10;
opacity: .95;
filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2,OffY=2,Color='silver',Positive='true') alpha(opacity=95);
}
.LocaleManagementFlyoutPopup A, .LocaleManagementFlyoutPopup A:visited {
font-size: 10px;
color: #000000;
cursor: hand;
border: 1px solid #FFFFFF;
padding: 1px 3px 1px 3px;
height: 15px;
text-align: left;
text-decoration: none;
white-space: nowrap;
display: block;
}
.LocaleManagementFlyoutPopup A:hover {
background-color: #f0f7fd;
color: #000000;
cursor: hand;
border: 1px solid #addbef;
padding: 1px 3px 1px 3px;
height: 15px;
text-decoration: none;
white-space: nowrap;
display: block;
}
.LocaleManagementFlyoutPopupHr {
height: 1px;
background: #d0e0f0;
margin: 0px 11px 21px 11px;
}
.LocaleManagementFlyoutPopArrow {
margin: 4px 0px 0px 0px;
}
.LocaleManagementFlyoutStatic_msdn {
border: 1px solid #ffffff;
}
.LocaleManagementFlyoutStaticHover_msdn {
border: 1px solid #addbef;
}
.TFlyPopupAnimate {
position: absolute;
display: block;
border: 1px solid gray;
overflow: hidden;
visibility: hidden;
margin: 0;
padding: 0;
z-index: 1;
}
</style>
<script>
/*
name                 对象的 id 值
offsetLeft           定位:左 - 偏移量
offsetTop           定位:顶部 - 偏移量
alignment           对齐方式{-1: left; 0: center; 1: right}
anyIter              显示方式(<=0: 普通样式; >0: 缩放样式)
anyTime             动画时间间隔
staticHover         鼠标覆盖时的样式
popupHover         显示内容鼠标覆盖时的样式
popupLatency      显示内容延时
hideLatency         隐藏内容延时
onInit                 初始化
onPopup              显示内容时行为
onHide                隐藏内容时行为
*/
function TFly_Init(name,  offsetLeft, offsetTop, alignment, anyIter, anyTime, staticHover, popupHover, popupLatency, hideLatency, onInit, onPopup, onHide) {
var TFly = document.getElementById(name);
TFly.DT = document.getElementById(name + "_Popup");    //    显示内容对象
TFly.F = document.getElementById(name + "_Anim");    //    动画效果对象
TFly.oX = offsetLeft;
TFly.oY = offsetTop;
TFly.alignment = alignment;
TFly.AnyIter = anyIter;
TFly.AnyTime = anyTime;
TFly.popupLatency = popupLatency;
TFly.hideLatency = hideLatency;
TFly.onPopup = onPopup;
TFly.onHide = onHide;
TFly.onmouseover = function() {
if (staticHover != '') {    //    替换样式,并储存原来的样式
TFly.className_ = TFly.className;
TFly.className = staticHover;
}
TFly_Popup(TFly, true);
}
TFly.onmouseout = function() {
if (staticHover != '') {    //    恢复原来的样式
TFly.className = TFly.className_;
}
TFly_Popup(TFly, false);
}
if (document.all) {
TFly.onactivate = TFly.onmouseover;
TFly.ondeactivate = TFly.onmouseout;
} else {
TFly.onfocus = TFly.onmouseover;
TFly.onblur = TFly.onmouseout;
}
TFly.DT.onmouseover = function() {
if (popupHover != '') {
TFly.DT.className_ = TFly.DT.className;
TFly.DT.className = popupHover;
}
TFly_Popup(TFly, true);
}
TFly.DT.onmouseout = function() {
if (popupHover != '') {
TFly.DT.className = TFly.DT.className_;
}
TFly_Popup(TFly, false);
}
TFly_CallClientFunction(onInit, TFly);
}
//    调用初始化程序
function TFly_CallClientFunction(name, TFly) {
if (name != null &&  name != "")
eval(name + "(TFly);");
}
//    定位
function TFly_SetPosition(TFly, obj) {
obj.style.top = TFly.oY + TFly.offsetHeight + "px";
obj.style.left = TFly.oX + (TFly.offsetWidth - obj.offsetWidth ) * (1 + TFly.alignment) / 2 + "px";
}
function TFly_Popup(TFly, value) {
if (TFly.timer != null) window.clearTimeout(TFly.timer);    //    清除超时
if (value) {    //    判断状态
if (TFly.status == "on") return;
//    如果 popup 已经显示,则显示延时为 0
//    例如从一个菜单移动到另外一个菜单
var timeout = (TFly.status == "active") ? 0 : TFly.popupLatency;
if (TFly.AnyIter > 0 && TFly.AnyTime > 0)
TFly.timer = window.setTimeout(function() {TFly_AnimateStart(TFly, true, TFly.F.curIter);}, timeout);
else
TFly.timer = window.setTimeout(function() {TFly_SetVisibility(TFly, true);}, timeout);
} else {
if (TFly.status == "off") return;
var timeout = (TFly.status == "active") ? 0 : TFly.hideLatency;
if (TFly.AnyIter > 0 && TFly.AnyTime > 0)
TFly.timer = window.setTimeout(function() {TFly_AnimateStart(TFly, false, TFly.F.curIter);}, timeout);
else
TFly.timer = window.setTimeout(function() {TFly_SetVisibility(TFly, false);}, timeout);
}
}
//    设置弹出内容的可见性
function TFly_SetVisibility(TFly, value) {
if (value == true) {
TFly_SetPosition(TFly, TFly.DT);
TFly.DT.style.visibility = "visible";
TFly.style.zIndex = "999";
} else {
TFly.DT.style.visibility = "hidden";
TFly.style.zIndex = "0";
TFly.DT.style.left = "-10000px";
}
}
function TFly_AnimateStart (TFly, inout, curIter) {
if (TFly.F.timer != null) window.clearTimeout(TFly.F.timer);
if (curIter == null) curIter=0;
if (TFly.status != "active") {
TFly.status = "active";
TFly.F.style.visibility = "visible";
TFly.DT.style.visibility = "hidden";
}
if (curIter < 0 || curIter > TFly.AnyIter) {
TFly.F.curIter = (curIter < 1) ? 0 : TFly.AnyIter;
TFly.status = (TFly.F.curIter == TFly.AnyIter) ? "on": "off";
TFly.F.style.visibility = "hidden";
TFly_SetPosition(TFly, TFly.DT);
TFly.style.zIndex = (TFly.F.curIter == TFly.AnyIter) ? "999" : "0";
if (TFly.F.curIter == TFly.AnyIter) {
TFly.status = "on";
TFly_SetVisibility(TFly, true);
TFly_CallClientFunction(TFly.onPopup, TFly);
} else {
TFly.status = "off";
TFly_SetVisibility(TFly, false);
TFly_CallClientFunction(TFly.onHide, TFly);
}
} else {
var per = curIter * (95 / TFly.AnyIter) + 5;
TFly.F.style.visibility = "hidden";
TFly.F.style.width = TFly.DT.offsetWidth / 100 * per + "px";
TFly.F.style.height = TFly.DT.offsetHeight / 100 * per + "px";
TFly_SetPosition(TFly, TFly.F);
TFly.F.style.visibility = "visible";
var timeout = (per == 100 ) ? 0 : TFly.AnyTime - (TFly.AnyTime / (TFly.AnyIter) * (curIter));
curIter += (inout) ? 1 : -1;
TFly.F.timer = window.setTimeout(function() {TFly_AnimateStart(TFly, inout, curIter)}, timeout);
TFly.F.curIter = curIter;
}
}
</script>
</head>
<body>
<div style="display:inline;vertical-align:middle">
<div class="LocaleManagementFlyoutStatic_msdn" style="position:relative;" id="LocaleManagement"><a class="LocaleManagementFlyoutStaticLink_msdn" href="javascript:void(0)">United States - English </a><img class="LocaleManagementFlyoutPopArrow" src="http://msdn2.microsoft.com/msdn/Controls/UserRecognitionFlyout/en-us/popdownarrow-msdn-left.gif" alt="Dropdown Arrow" style="height:4px;width:7px;border-width:0px;" /><div id="LocaleManagement_Popup" class="LocaleManagementFlyoutPopup" style="position: absolute;visibility:hidden;left:-65534px;">
<table border="0" style="width:175px;">
<tr>
<td><a href="javascript:__doPostBack('ctl00$BannerControl1$LocaleManagement$ctl00$ctl05','')">Australia (English)</a></td>
</tr><tr>
<td><a href="javascript:__doPostBack('ctl00$BannerControl1$LocaleManagement$ctl00$ctl06','')">Brasil (Portugués)</a></td>
</tr><tr>
<td><a href="javascript:__doPostBack('ctl00$BannerControl1$LocaleManagement$ctl00$ctl07','')">Canada (English)</a></td>
</tr><tr>
<td><a href="javascript:__doPostBack('ctl00$BannerControl1$LocaleManagement$ctl00$ctl08','')">Canada (Français)</a></td>
</tr><tr>
<td><a href="javascript:__doPostBack('ctl00$BannerControl1$LocaleManagement$ctl00$ctl09','')">中国 (简体中文)</a></td>
</tr><tr>
<td><a href="javascript:__doPostBack('ctl00$BannerControl1$LocaleManagement$ctl00$ctl10','')">Deutschland (Deutsch)</a></td>
</tr><tr>
<td><a href="javascript:__doPostBack('ctl00$BannerControl1$LocaleManagement$ctl00$ctl11','')">France (Français)</a></td>
</tr><tr>
<td><a href="javascript:__doPostBack('ctl00$BannerControl1$LocaleManagement$ctl00$ctl12','')">India (English)</a></td>
</tr><tr>
<td><a href="javascript:__doPostBack('ctl00$BannerControl1$LocaleManagement$ctl00$ctl13','')">Россия (Pусский)</a></td>
</tr><tr>
<td><a href="javascript:__doPostBack('ctl00$BannerControl1$LocaleManagement$ctl00$ctl14','')">United Kingdom (English)</a></td>
</tr><tr>
<td><a href="javascript:__doPostBack('ctl00$BannerControl1$LocaleManagement$ctl00$ctl15','')">United States (English)</a></td>
</tr><tr>
<td class="LocaleManagementFlyoutPopupHr"></td>
</tr><tr>
<td><a href="/en-us/preferences/lang/">More...</a></td>
</tr>
</table></div>
<div id="LocaleManagement_Anim" class="TFlyPopupAnimate"></div>
</div>
</div>
<script>
TFly_Init('LocaleManagement', 0, 0, -1, 2, 60, 'LocaleManagementFlyoutStaticHover_msdn', '', 100, 400, '', '', '');
</script>
</body>
</html>

















<!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=gb2312" />
<title>可调整框架</title>
<style type="text/css">
body {
padding: 5px;
margin: 0;
border: 0;
}
body, div, input, select, textarea {
font-size: 12px;
color: #0066CC;
}
#cl {
width: 200px;
padding: 4px;
margin: 0;
border: 1px solid #66CCFF;
}
#cm {
width: 5px;
padding: 0;
margin: 0;
border: 0;
}
#cr {
width: auto;
padding: 4px;
margin: 0;
border: 1px solid #66CCFF;
}
</style>
<script type="text/javascript" language="javascript">
//    全局对象
var oB;
var oCS;
var oCL;
var oCM;
var oCR;
//    全局变量
var _winWidth = 600;
var _winHeight = 480;
var currWinWidth;
var currWinHeight;
var _color = "#66CCFF";
function initCols() {
oB = document.body;
oCS = document.getElementById("cs");
oCL = document.getElementById("cl");
oCM = document.getElementById("cm");
oCR = document.getElementById("cr");
//    oB.style.padding = "5px";
//    oB.style.margin = "0";
//    oB.style.border = "0";
//oB.style = "padding: 5px; margin: 0; border: 0;";
//    oCS.style.padding = "0";
//    oCS.style.margin = "0";
//    oCS.style.border = "0";
//oCS.style = "padding: 0; margin: 0; border: 0;";
//    oCL.style.width = oCL.minWidth + "px";
//    oCL.style.float = "left";
//    oCL.style.padding = "4px";
//    oCL.style.margin = "0";
//    oCL.style.border = "1px solid " + _color;
//oCL.style="width: 200px; float: left; padding: 4px; margin: 0; border: 1px solid #66CCFF;";
//    oCM.style.width = "5px";
//    oCM.style.float = "left";
//    oCM.style.padding = "0";
//    oCM.style.margin = "0";
//    oCM.style.border = "0";
//oCM.style="background-color: #FFFFFF; width: 5px; float: left; padding: 0; margin: 0; border: 0;";
//    oCR.style.padding = "4px";
//    oCR.style.float = "left";
//    oCR.style.margin = "0";
//    oCR.style.border = "1px solid " + _color;
//oCR.style="float: left; padding: 4px; margin: 0; border: 1px solid #66CCFF;";
oB.adjust = (parseInt(oB.style.padding) + parseInt(oB.style.margin) + parseInt(oB.style.borderWidth)) * 2;
oCL.adjust = (parseInt(oCL.style.padding) + parseInt(oCL.style.margin) + parseInt(oCL.style.borderWidth)) * 2;
oCM.adjust = (parseInt(oCM.style.padding) + parseInt(oCM.style.margin) + parseInt(oCM.style.borderWidth)) * 2;
oCR.adjust = (parseInt(oCR.style.padding) + parseInt(oCR.style.margin) + parseInt(oCR.style.borderWidth)) * 2;
resizeCols();
}
function resizeCols() {
currWinWidth = getWinWidth();
currWinHeight = getWinHeight();
oCL.minWidth = 200;
oCL.maxWidth = currWinWidth - 300 - oB.adjust - oCL.adjust - oCM.adjust - oCR.adjust;
resizeCol(oCS, currWinWidth - oB.adjust, currWinHeight - oB.adjust);
resizeCol(oCL, parseInt(oCL.style.width), parseInt(oCS.style.height) - oCL.adjust);
resizeCol(oCM, parseInt(oCM.style.width), parseInt(oCS.style.height) - oCM.adjust);
resizeCol(oCR, parseInt(oCS.style.width) - parseInt(oCL.style.width) - parseInt(oCM.style.width) - oCL.adjust - oCM.adjust - oCR.adjust, parseInt(oCS.style.height) - oCR.adjust);
oCL.style.borderColor = _color;
oCR.style.borderColor = _color;
}
function resizeCol(o, w, h) {
o.style.width = w + "px";
o.style.height = h + "px";
}
function getWinWidth() {
if (window.innerWidth) return window.innerWidth;
else if (document.documentElement.clientWidth) return document.documentElement.clientWidth;
else if (document.body.offsetWidth) return document.body.offsetWidth;
else return _winWidth;
}
function getWinHeight() {
if (window.innerHeight) return window.innerHeight;
else if (document.documentElement.clientHeight) return document.documentElement.clientHeight;
else if (document.body.offsetHeight) return document.body.offsetHeight;
else return _winHeight;
}
function CM() {}
CM.mouseover = function() {
oCM.style.backgroundColor = _color;
}
CM.mouseout = function() {
oCM.style.backgroundColor = "#FFFFFF";
}
CM.mousedown = function(e) {
e = (e) ? e : event;
CM.ismousedown = true;
CM.posX = e.clientX;
oCM.style.backgroundColor = _color;
document.body.style.cursor = "e-resize";
return false;
}
CM.mouseup = function() {
CM.ismousedown = false;
oCM.style.backgroundColor = _color;
oCM.style.backgroundColor = "#FFFFFF";
document.body.style.cursor = "auto";
CM.posX = parseInt(oCL.style.width) + oCL.adjust + oB.adjust / 2;
return false;
}
CM.mousemove = function(e) {
if (CM.ismousedown) {
e = (e) ? e : event;
var newPosX = e.clientX;
oCR.innerHTML = " newPosX: " + newPosX + "<br />";
oCR.innerHTML += "CM.posX: " + CM.posX + "<br />";
oCR.innerHTML += ".......: " + (newPosX - CM.posX);
newWidth = parseInt(oCL.style.width) + (newPosX - CM.posX);
if (newWidth >= oCL.minWidth && newWidth <= oCL.maxWidth) {
oCL.style.width = newWidth + "px";
oCR.style.width = parseInt(oCR.style.width) - (newPosX - CM.posX) + "px";
CM.posX = newPosX;
}
return false;
} else return true;
}
String.prototype.toHex = function(){
var N = parseInt(this);
if (N==0 || isNaN(N)) return "00";
N = Math.round(Math.min(Math.max(0, N), 255));
return "0123456789ABCDEF".charAt((N - N % 16) / 16) + "0123456789ABCDEF".charAt(N % 16);
}
String.prototype.rgbToHex = function(){
var rgb = this.match(/[rgba]{3,4}/(([/d]{0,3}),[/s]([/d]{0,3}),[/s]([/d]{0,3})/)/);
return rgb[1].toHex() + rgb[2].toHex() + rgb[3].toHex();
}
window.onload = initCols;
</script>
</head>
<body οnresize="resizeCols();" οnmοuseup="return CM.mouseup();" οnmοusemοve="return CM.mousemove(event);" style = "padding: 5px; margin: 0; border: 0;">
<div id="cs" style = "padding: 0; margin: 0; border: 0;">
<div id="cl" style="width: 200px; float: left; padding: 4px; margin: 0; border: 1px solid #66CCFF;"></div>
<div id="cm" οnmοuseοver="CM.mouseover();" οnmοuseοut="CM.mouseout();" οnmοusedοwn="return CM.mousedown(event);" style="background-color: #FFFFFF; width: 5px; float: left; padding: 0; margin: 0; border: 0;"></div>
<div id="cr" style="float: left; padding: 4px; margin: 0; border: 1px solid #66CCFF;"></div>
</div>
</body>
</html>















<SCRIPT>
var imagepath="http://blog.e4dai.info/images/logos.gif";;
var imagewidth=88;  //这两行写图片的大小
var imageheight=31;
var speed=3; //
var imageclick="http://blog.e4dai.info";; //这里写点击图片连接到的地址
var hideafter=0;
var isie=0;
if(window.navigator.appName=="Microsoft Internet Explorer"&&window.navigator.appVersion.substring(window.navigator.appVersion.indexOf("MSIE")+5,window.navigator.appVersion.indexOf("MSIE")+8)>=5.5) {
isie=1;
}
else {
isie=0;
}
if(isie){
var preloadit=new Image()
preloadit.src=imagepath
}
function pop() {
if(isie) {
x=x+dx;y=y+dy;
oPopup.show(x, y, imagewidth, imageheight);
if(x+imagewidth+5>screen.width) dx=-dx;
if(y+imageheight+5>screen.height) dy=-dy;
if(x<0) dx=-dx;
if(y<0) dy=-dy;
startani=setTimeout("pop();",50);
}
}
function dismisspopup(){
clearTimeout(startani)
oPopup.hide()
}
function dowhat(){
if (imageclick=="dismiss")
dismisspopup()
else
window.open(imageclick);
}
if(isie) {
var x=0,y=0,dx=speed,dy=speed;
var oPopup = window.createPopup();
var oPopupBody = oPopup.document.body;
oPopupBody.style.cursor="hand"
oPopupBody.innerHTML = '<IMG SRC="'+preloadit.src+'">';
oPopup.document.body.οnmοuseοver=new Function("clearTimeout(startani)")
oPopup.document.body.οnmοuseοut=pop
oPopup.document.body.οnclick=dowhat
pop();
if (hideafter>0)
setTimeout("dismisspopup()",hideafter*1000)
}
</SCRIPT>






















<script language="JavaScript">
<!--
var scrollerwidth=95
var scrollerheight=35
var scrollerbgcolor='white'
var pausebetweenimages=3000
var slideimages=new Array()
slideimages[0]='<a href="http://blog.e4dai.info/" target="_blank"><img src="http://blog.e4dai.info/images/logos.gif" border=0></a>'
slideimages[1]='<a href="http://bbs.blueidea.com/" target="_blank"><img src="http://www.21ce.cn/blog/uploads/200612/05_175606_3331.gif" border=0></a>'
if (slideimages.length>1)
i=2
else
i=0
i=0
function move1(whichlayer){
  tlayer=eval(whichlayer)
  if (tlayer.top>0&&tlayer.top<=5){
    tlayer.top=0
    setTimeout("move1(tlayer)",pausebetweenimages)
    setTimeout("move2(document.main.document.second)",pausebetweenimages)
    return
  }
  if (tlayer.top>=tlayer.document.height*-1){
    tlayer.top-=5
    setTimeout("move1(tlayer)",100)
  }
  else{
    tlayer.top=scrollerheight
    tlayer.document.write(slideimages[i])
    tlayer.document.close()
    if (i==slideimages.length-1)
    i=0
    else
    i++
  }
}
function move2(whichlayer){
  tlayer2=eval(whichlayer)
  if (tlayer2.top>0&&tlayer2.top<=5){
    tlayer2.top=0
    setTimeout("move2(tlayer2)",pausebetweenimages)
    setTimeout("move1(document.main.document.first)",pausebetweenimages)
    return
  }
  if (tlayer2.top>=tlayer2.document.height*-1){
    tlayer2.top-=5
    setTimeout("move2(tlayer2)",100)
  }
  else{
    tlayer2.top=scrollerheight
    tlayer2.document.write(slideimages[i])
    tlayer2.document.close()
    if (i==slideimages.length-1)
    i=0
    else
    i++
  }
}
function move3(whichdiv){
  tdiv=eval(whichdiv)
  if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){
    tdiv.style.pixelTop=0
    setTimeout("move3(tdiv)",pausebetweenimages)
    setTimeout("move4(second2)",pausebetweenimages)
    return
  }
  if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){
    tdiv.style.pixelTop-=5
    setTimeout("move3(tdiv)",100)
  }
  else{
    tdiv.style.pixelTop=scrollerheight
    tdiv.innerHTML=slideimages[i]
    if (i==slideimages.length-1)
    i=0
    else
    i++
  }
}
function move4(whichdiv){
  tdiv2=eval(whichdiv)
  if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){
    tdiv2.style.pixelTop=0
    setTimeout("move4(tdiv2)",pausebetweenimages)
    setTimeout("move3(first2)",pausebetweenimages)
    return
  }
  if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){
    tdiv2.style.pixelTop-=5
    setTimeout("move4(second2)",100)
  }
  else{
    tdiv2.style.pixelTop=scrollerheight
    tdiv2.innerHTML=slideimages[i]
    if (i==slideimages.length-1)
    i=0
    else
    i++
  }
}
function startscroll(){
  if (document.all){
    move3(first2)
    second2.style.top=scrollerheight
  }
  else if (document.layers){
    move1(document.main.document.first)
    document.main.document.second.top=scrollerheight+5
    document.main.document.second.visibility='show'
  }
}
window.οnlοad=startscroll
//-->
</script>
</p>
<ilayer id="main" width=&{scrollerwidth}; height=&{scrollerheight}; bgcolor=&{scrollerbgcolor};>
<layer id="first" left=0 top=1 width=&{scrollerwidth};>
<script language="JavaScript1.2">
if (document.layers)
document.write(slideimages[0])
</script>
</layer>
<layer id="second" left=0 top=0 width=&{scrollerwidth}; visibility=hide>
<script language="JavaScript1.2">
if (document.layers)
document.write(slideimages[1])
</script>
</layer>
</ilayer>
<p>
<script language="JavaScript1.2">
<!--
if (document.all){
document.writeln('<span id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hiden;background-color:'+scrollerbgcolor+'">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0;top:0">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0;top:1;">')
document.write(slideimages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0;top:0">')
document.write(slideimages[1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</span>')
}
//-->
</script>

















<script language="javascript" type="text/javascript">
<!--
/*常用函数库---开始---*/
function $(objString){
return document.getElementById(objString);
}
function addClass(elem,classString){
if(typeof(elem)=="string")
var obj = document.getElementById(elem);
else if(typeof(elem)=="object")
var obj = elem;
obj.className = obj.className + " "+classString;
}
function removeClass(elem,classString){
if(typeof(elem)=="string")
var obj = document.getElementById(elem);
else if(typeof(elem)=="object")
var obj = elem;
var classNameArray = obj.className.split(" ");
for (i=0; j=classNameArray[i] ; i++){
if(j==classString){
classNameArray.splice(i,1);
i--;
}
}
obj.className = classNameArray.join(" ");
}
function hasClass(elem,classString){
if (typeof(elem)=="string"){
var obj = document.getElementById(elem);
}else if(typeof(elem)=="object"){
var obj = elem;
}
if (obj.className.indexOf(" ")!=-1){
var cls = obj.className.replace(/ /g,"|");
cls = "|"+cls+"|";
if (cls.indexOf("|"+classString+"|")!=-1){
return true;
}else{return false}
}else{
if (obj.className == classString){
return true;
}else{
return false;
}
}
}
/*常用函数库---结束---*/
function highLight(obj){
if (obj.highlightHandel!=null)
return;
obj.highlightHandel = setInterval(function(){twinkle(obj)},250);
}
function twinkle(objBox){
hasClass(objBox,"highLight")?removeClass(objBox,"highLight"):addClass(objBox,"highLight");
}
function stopTwinkle(obj){
clearInterval(obj.highlightHandel);
removeClass(obj,"highLight");
obj.removeAttribute("highlightHandel");
}
//-->
</script>
<style>
.box {border:1px solid #ccc; height:100px; width:600px; text-align:center; line-height:100px; background-color:#f7f7f7}
.highLight {background-color:#ffffcc; border:1px solid #f30}
</style>
<div id="demo" class="box">
Box I
</div>
<br>
<input type="button" value="闪烁" οnclick="highLight($('demo'))" />
<input type="button" value="停止" οnclick="stopTwinkle($('demo'))" />
<br>
<br>
<div id="demo2" class="box">
Box II
</div>
<br>
<input type="button" value="闪烁" οnclick="highLight($('demo2'))" />
<input type="button" value="停止" οnclick="stopTwinkle($('demo2'))" />









 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值