zoukankan
html css js c++ java
一个JS的问题,请帮下忙!
做一个树,可以展开,我刚学JS,一下午都没搞出,头疼的很,问下大家
主文件
<
body
onclick
="menuChange();"
>
<
div
align
="left"
>
Windows核心编程
</
div
>
<
span
class
="menu"
id
="menu1"
>
程序员必读
</
span
>
<
div
id
="submenu1"
style
="display:none"
>
<
div
class
="indent"
>
<
p
><
a
href
="11.html"
>
定义自己的错误代码
</
a
></
p
>
<
p
><
a
href
="12.html"
>
字符集
</
a
></
p
>
<
p
><
a
href
="13.html"
>
需要注意的问题
</
a
></
p
>
<
p
><
a
href
="14.html"
>
对COM的简单说明
</
a
></
p
>
</
div
>
</
div
>
<
link
href
="tree.css"
rel
="stylesheet"
type
="text/css"
>
<
script
language
="javascript"
type
="text/javascript"
src
="tree.js"
></
script
>
<
style
type
="text/css"
>
tree.js
<!--
function
menuChange()
{
var
src;
var
subId;
if
(window.event.srcElement.className
==
"
menu
"
)
{
subId
=
"
sub
"
+
window.event.srcElement.id;
if
(document.all(subId).style.display
==
"
none
"
)
{
document.all(subId).style.display
==
"
block
"
;
}
else
{
document.all(subId).style.display
==
"
none
"
;
}
}
}
//
-->
打开时,停在“程序员必读”上,怎么点也展不开,我怀疑是subid=....这句错了,但对JS真的不懂,请指点下
查看全文
相关阅读:
vue源码分析—Vue.js 源码目录设计
vue源码分析—认识 Flow
在Windows上安装配置MongoDB
mongoDB概述
Could not load file or assembly Microsoft.Web.Infrastructure
配置错误 不能在此路径中使用此配置节(转)
VS2013快捷键大全
Create new tool for CSV
How to get http response.
C#中Split用法
原文地址:https://www.cnblogs.com/bo8888/p/760872.html
最新文章
C/S、B/S的区别
管道
wait、waitpid
exec函数族
h5页面在ios上的问题解决
学习大师-webkit-overflow-scrolling:touch及ios滚动
Promise学习
基于vue的h5实现图片裁剪功能(cropperjs)
js生成pdf文件的简单使用
mysql 1251 Client does not support authentication protocol requested by server; consider upgrading mysql client
热门文章
Egg企业级应用开发框架的搭建
koa学习之路七
koa学习之路六
koa学习之路五
redux详解
react-router详细解释
JSBridge的实现
Hybrid APP之Native和H5页面交互原理
Hybrid App—Hybrid App开发模式介绍和各种开发模式对比
vue源码分析—Vue.js 源码构建
Copyright © 2011-2022 走看看