背景色测试 function setcolor() { var colorString; do{ colorString="#"+Math.floor(Math.random()*Math.pow(2,24)).toString(16); } while (colorString.lengthdocument.getElementById("mydiv").style.backgroundColor=colorString; setTimeout(setcolor,100); } 背景色测试 function setcolor() { var colorString; do{ colorString="#"+Math.floor(Math.random()*Math.pow(2,24)).toString(16); } while (colorStrin...
php代码<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> <style type="text/css"> ul{ list-style:none; } a{ padding-left:1.5em;font-size:12px;height:23px;line-height:23px;color:gray;text-decoration...
得到元素真实的背景颜色 by Longbill .classname {background-color:#ff99dd;} #div3 {background-color:#d8bfd8;} div {background-color:#87cefa;border:1px solid #333333;margin:10px;padding:4px;} body {background-color:#bed742;} #div4 {background-color:transparent;} 得到元素真实的背景颜色 By Longbill div1 直接通过div标签定义背景色(#87cefa) div2 通过class name定义背景色(#ff99dd) div3...
New Document title 111 222 333 444 555 666 objName=document.getElementById("list01").getElementsByTagName("li") for (i=0;i [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
.class1{ background:#efefef; text-align:center; width:80px; } .class2{ background: #ffcc00; text-align:center; width: 80px; } .class3{ background: #ffffff; } .class4{ background: #ffff00; } function addEvent(elm, evType, fn, useCapture){ if (elm.addEventListener){ elm.addEventListener(evType, fn, useCapture); return true; } else if (elm.attachEvent){ var r = elm.attachEvent("on"+evType, fn); ret...
PNG.JS代码: // PNGHandler: Object-Oriented Javascript-based PNG wrapper // -------------------------------------------------------- // Version 1.1.20031218 // Code by Scott Schiller - www.schillmania.com // -------------------------------------------------------- // Description: // Provides gracefully-degrading PNG functionality where // PNG is supported natively or via filters (Damn you, IE!) //...
很多人都遇到过在页面部分操作中IE背景图片重新加载而导致页面闪动的bug,那么如何解决它呢? 在国外某blog上看到一解决办法: 添加如下脚本即可: document.execCommand("BackgroundImageCache", false, true) 很简单吧?但很奇怪为什么这不是IE浏览器默认的选项呢?有哪位高人知道原因的请告知俺,不甚感激!
有没有看到过页面完全反过来的网页? 试试点击运行看看?! elgooG [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
无标题文档 #div1{ height:200px;width:200px; filter:progid:DXImageTransform.Microsoft.RevealTrans(duration=1,transition=12); background:#CCCCCC; } 222222222"; temp = 1; } else { div1.innerHTML = "111111111"; temp = 0; } div1.filters[0].play(); } window.setInterval(playIt,5000); // [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
一打开网页不需要点击,能够直接全屏隐藏地址栏的那种如何实现 如我把静态网页刻到光盘中,打开立刻全屏,语言表达能力不太好哈,见谅if (this.name!='FullWnd') { window.open(location.href,'FullWnd','fullscreen,scrollbars=no'); this.parent.opener=null; this.parent.close(); } [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
得到元素真实的背景颜色 .classname {background-color:#ff99dd;} #div3 {background-color:#d8bfd8;} div {background-color:#87cefa;border:1px solid #333333;margin:10px;padding:4px;} body {background-color:#bed742;} #div4 {background-color:transparent;} 得到元素真实的背景颜色 By Longbill div1 直接通过div标签定义背景色(#87cefa) div2 通过class name定义背景色(#ff99dd) div3 通过id定义背...
www.gxlcms.com 脚本之家 随即变色 " + "" + "" + this.title + "" + "0" + "r" + "" + "" + this.message + "" + "" + ""; document.body.insertAdjacentHTML("beforeEnd",str); } //显示隐藏窗口 function ShowHide(id,dis){ var bdisplay = (dis==null)?((document.getElementById("xMsg"+id).style.display=="")?"none":""):dis document.getElementById("xMsg"+id).style.display = bdisplay; document.getEle...
背投广告,既然被称为广告,那如何才能让广告主的钱花得实在,花得乐意呢? 我们可以增加判断,如果该弹出窗口被浏览器拦截,则只要用户点击页面就触发 window.open 事件,这样一般不会拦截,浏览器会认为这是用户的默认行为。 代码可编写如下: 代码如下:var $E = YAHOO.util.Event; var adPopup; var popAd = function(sURL,sName,sFeatures,bReplace) { if (adPopup) return; if(sName == undefined) { s...
景变暗的div可拖动提示窗口 function alertWin(title, msg, w, h){ var titleheight = "22px"; // 提示窗口标题高度 var bordercolor = "#666699"; // 提示窗口的边框颜色 var titlecolor = "#FFFFFF"; // 提示窗口的标题颜色 var titlebgcolor = "#666699"; // 提示窗口的标题背景色 var bgcolor = "#FFFFFF"; // 提示内容的背景色 var iWidth = document.documentElement.clientWidth; var iHeight = document.documentElem...
Information!" + "" + ""+ "" ; var s2 = ""+label+"" ; var s3 = " "+ ""+ ""; popup = window.open("","popDialog","height=160,width=300,scrollbars=no") ; popup.document.write(s1+s2+msg+s3) ; popup.document.close(); } function popHelp() { PopIt('http://www.gxlcms.com,有趣吧?', '你可以用来做弹出窗口,' + '显示重要信息哦'); } [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]