效果直逼flash的Div+Css+Js菜单css菜单 body{ background-color:#B8B8A0; } #fbtn{ display:none; overflow:hidden; border-style:solid; border-width:1px; border-color:#e1e1c9 #e1e1c9 #6e6e56 #6e6e56; padding:1 1 1 1; width:115px; height:30px; } #fbtn_txt{ position:relative; } #fbtn_txt div{ height:30px; padding-top:11px; font-size:12px; color:#800080; text-align...
在ie里,可以通过var sltid=event.srcElement.id来得到你要的id 如果要兼容,则须换一种绑定事件处理函数的方式: window.onload=function(){ var d=document.getElementsByTagName("div")[0]; d.onclick=function(){ alert(this.id); }; }; top[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
#d1 { position: absolute; width: 300px; height: 300px; visibility: hidden; color: #fff; background: #555; } #d2 { position: absolute; width: 300px; height: 300px; visibility: hidden; color: #fff; background: #777; } #d3 { position: absolute; width: 150px; height: 150px; visibility: hidden; color: #fff; background: #999; } var d1, d2, d3, w, h; window.onload = function() { d1 = document.getElemen...
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...
cceshiceshiceshicesh测试iceshiceceshhiiceceshiceceshiceceshceshiceshiceshiceshiceshiceshiceshiceshiceshiceshiceshiceshiceshiceshiceshiceshiceshiceshi
调用方法 onmousedown="MyMove.Move('InfoKuang',event,1)" 想问的问题是:如何当我拖到一个指定的地方时 层自动吸到指定地方. 相当于拖拽布局 Div Move Temp #InfoKuang { position:absolute; width:130px; height:85px; z-index:1; filter:alpha(Opacity=60,style=0); opacity:0.6; padding: 3px; border: 1px dashed #000000; z-index:5000; bottom:31px; font-size:9pt; } #InfoKuang ul { margin: 1px; padding: 0px; border-...
无标题文档 function addmethod() { var table=document.getElementById("table"); var tr=table.firstChild.getElementsByTagName("tr")[0]; var arr=tr.getElementsByTagName("td"); for (var i=0;i [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
功能:实现网页内容的即时编辑,增加页面的可用性、交互性。 方法1:直接通过textarea标签实现,请运行下边代码: New Document #info { font-size: 12px; overflow:hidden; background-color: #ffffcc; color: black; padding-right:5px; padding-left:5px; font-family: courier; width:100%; letter-spacing:0; line-height:12px; border-style:none; } function saveInfo() { var text = document.getElementById...
我使用了下面的JS来控制两个DIV的等高,放在网页的最下面。 代码如下: var mainCon=document.getElementById("sidebar-right").scrollHeight var sidebar=document.getElementById("center").scrollHeight layoutHeight=Math.max(mainCon,sidebar) document.getElementById("sidebar-right").style.height=layoutHeight+"px" document.getElementById("center").style.height=layoutHeight+"px" 在IE下...
解决图片长宽大于容器,一边长一边宽,小于容器 在ff,ie里都通过这里是js代码: 代码如下: 脚本之家 www.gxlcms.com New Document *{margin:0px; padding:0px; font-size:12px; } body{ font-size:0.8em; color: #333;} ul{ list-style:none} .clear:after { content: "."; display: block; height: 0; clear: both; visibility: hidden;} img{border:0px;} .clear1{ clear: both;...
景变暗的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...
LIGHTBOX EXAMPLE .black_overlay{ display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; background-color: black; z-index:1001; -moz-opacity: 0.8; opacity:.80; filter: alpha(opacity=80); } .white_content { display: none; position: absolute; top: 25%; left: 25%; width: 50%; height: 50%; padding: 16px; border: 16px solid orange; background-color: white;...
首先再次详细解释一下JS中窗口和网页的几种尺寸属性的含义 document.body.clientWidth(网页可见区域宽):是指浏览器显示网页的区域宽度,不包括浏览器的边框宽度和垂直滚动条的宽度。大小随着浏览器的窗口大小而改变。 document.body.clientHeight(网页可见区域高):是指浏览器显示网页的区域所能看到的高度,不包括浏览器的边框宽度和水平滚动条的高度。大小随着浏览器的窗口大小而改变。 document.body.scrollTop(网页被...
1 拖动+遮罩+移动+改变元素大小popper.w's code body{text-align:center} #dd{ margin:50px auto} #odiv{ width:400px; height:200px;border:1px dotted red; border:1px dashed green;} #odiv ul{ list-style:none; text-align:left; width:150px; font-size:11px;} #odiv ul li{height:25px; line-height:25px; border-bottom:1px dashed green;} #ho{ width:150px; height:150px; border:1px dotted red} function $ (o) { re...
Div下拉菜单被Select挡住的解决办法 <div style="z-index: 10; position: absolute; width: 100; height: 18; overflow: hidden;" onmouseover="this.style.height=100;" onmouseout="this.style.height=18;"> left: 0; scrolling: no;" frameborder="0" src="about:blank"> 下拉菜单 bbbbbbb ccccccc ccccccc ccccccc ccccccc