点就展开的范例
来源:互联网 发布:澳门网络真人赌博官网 编辑:程序博客网 时间:2024/04/29 05:44
<htmlxmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>div -页面布局页例(模仿IBM)</title>
<style type="text/css">
.menutitle{
cursor:pointer;
margin-bottom: 5px;
background-color:#ECECFF;
color:#000000;
width:140px;
padding:2px;
text-align:center;
font-weight:bold;
border:1px solid #000000;
}
.submenu{
margin-bottom: 0.5em;
}
</style>
<script type="text/javascript">
var persistmenu="yes" //"yes" or "no". Make sure each SPAN contentcontains an incrementing ID starting at 1 (id="sub1", id="sub2",etc)
var persisttype="sitewide" //enter "sitewide" for menu to persistacross site, "local" for this page only
if (document.getElementByIdx){ //DynamicDrive.com change
document.write('<styletype="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}
function SwitchMenu(obj){
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function onloadfunction(){
if (persistmenu=="yes"){
var cookiename=(persisttype=="sitewide")? "switchmenu" :window.location.pathname
var cookievalue=get_cookie(cookiename)
if (cookievalue!="")
document.getElementByIdx(cookievalue).style.display="block"
}
}
function savemenustate(){
var inc=1, blockid=""
while (document.getElementByIdx("sub"+inc)){
if(document.getElementByIdx("sub"+inc).style.display=="block"){
blockid="sub"+inc
break
}
inc++
}
var cookiename=(persisttype=="sitewide")? "switchmenu" :window.location.pathname
var cookievalue=(persisttype=="sitewide")? blockid+";path=/" :blockid
document.cookie=cookiename+"="+cookievalue
}
if (window.addEventListener)
window.addEventListener("load", onloadfunction, false)
else if (window.attachEvent)
window.attachEvent("onload", onloadfunction)
else if (document.getElementByIdx)
window.onload=onloadfunction
if (persistmenu=="yes" &&document.getElementByIdx)
window.onunload=savemenustate
</script>
</head>
<body>
<!-- Keep all menus withinmasterdiv-->
<div id="masterdiv">
</div>
</body>
</html>
体验新版博客
- 点就展开的范例
- 试验:贝塞尔数组点的展开
- 点击展开再点收缩文本的效果
- 21点游戏 书上的的范例,稍改了点,不够精简,只好先放着了
- vuex的辅助函数mapState前面的那三个点--对象展开运算符
- Asp.net TreeView点节点中文字实现菜单的收缩与展开
- 软件基本概念(以概念点的形式展开,不断补充中…)
- 今天就动手,建立你的视频点抪平台
- 按钮没有到时间就点不了的JS程序
- 粗心的网友通过搜索引擎点进去就会“中招”-
- 没什么可写的就占用点资源吧
- 进程和线程(喜欢的就简单点)
- 当打开一个.h或.cpp文件时, Solution Explorer就自动展开文件所在的目录
- 当打开一个.h或.cpp文件时, Solution Explorer就自动展开文件所在的目录
- TXT坐标点展开到ArcGIS中
- 康托展开&康托逆展开 的写法
- 短信里的陌生链接千万不要点! 点了就会中招
- 自动展开的窗口
- 老色狼给小色狼的N条忠告
- 愿望
- 自动更新模块 13/10/18
- 世界上最NB的人
- 解决列高度自适应(列高度相同)的五…
- 点就展开的范例
- 减肥
- 减肥计划
- 天才智力题
- DIV内容垂直居中
- 在js中将number类型的数据转换成保留两位小数的字符串
- 不间断连续图片滚动效果的制作方法
- 令人肝肠寸断的100个签名
- 北京五大不可不去的隐秘餐厅