W3C UL 展开LI无法占位
时间:2011-04-26
来源:互联网
HTML code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title> New Document </title> <meta name="Generator" content="EditPlus"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> </head> <style> li {display:none;;height:20px;background-color:green;} ul {margin:0px;height:20px;background-color:#ccc;border:1 solid #ffc; list-style: none;} </style> <script> function show() { var o = event.srcElement; var childs = o.children for(var i in childs) if(childs[i].tagName=="LI") childs[i].style.display = "block" } </script> <body> <ul onclick="show()"> <li>1</li> <li>1</li> <li>1</li> <li>1</li> </ul> <ul onclick="show()"> <li>A</li> <li>A</li> <li>A</li> <li>A</li> </ul> </body> </html>
作者: coley 发布时间: 2011-04-26
这个展开UL,下面的LI是无法撑开下面的UL的.取消W3C是可以的,,请问在w3c下面如何操作呢
作者: coley 发布时间: 2011-04-26
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28