<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>toggle div</title>
<script language="JavaScript" type="text/javascript">
window.onload = init;
function init()
{
document.getElementById('dropper1').style.display = 'block';
document.getElementById('dropper2').style.display = 'none';
}
function toggleDiv(element)
{
var otherId = element == "dropper1" ? "dropper2" : "dropper1";
document.getElementById(otherId).style.display = 'none';
document.getElementById(element).style.display = 'block';
}
</script>
</head>
<body>
<table>
<tr>
<td onClick="toggleDiv('dropper1');">1</td>
<td onClick="toggleDiv('dropper2');">2</td>
</tr>
</table>
<div id="dropper1">
<ul>
<li>1</li>
</ul>
</div>
<div id="dropper2">
<ul>
<li>2</li>
</ul>
</div>
</body>
</html>
分享到:
相关推荐
代码如下: $(function(){ //toggle div $(“#gga”).click(function(event){ event.stopPropagation(); //阻止冒泡事件 $(“.toggleoption”).slideToggle(“fast”); }); //slideup div $(document).click(function...
Styled Toggle Button for Android Styled Toggle Button for Android Styled Toggle Button for Android
运行命令“ Source / Test Toggle”,在活动编辑器的源代码和测试文件之间切换。 默认键盘绑定: ctrl + alt + t 设定值 测试关键词 名称: sourceTestToggle.testKeywords 描述:搜索匹配的测试文件时要包括的...
test-toggle
- Changed the Memory test to wait for the Video Playback test and 3D test to allow memory allocation for these tests. - Minor changes to the No operation error watchdog timer for the CD and Hard ...
Toggle是unity中常用的控件之一, 该项目是Unity3D中的Toggle使用事件的方式控制交互方式,简单实用。
LED TOGGLE in stm32f411 nucleo.The project contains the cube mx files and other special files.
STM32 Led Toggle STM32 Led Toggle STM32 Led Toggle STM32 Led Toggle
This library adds two custom widgets that adhere to the Material Design definition for toggle buttons. Library is backwards compatible to API 9. You can add the library with: compile '...
超好超棒的bootstrap-toggle-buttons用在网页很不错
主要介绍了jQuery基于toggle实现click触发DIV的显示与隐藏,结合实例形式分析了toggle方法用于切换页面元素样式的相关使用技巧,需要的朋友可以参考下
toggleTest.nvim 它在测试文件和实施文件之间切换安装通过插件管理器(推荐)将Plug 'larecg/toggleTest.nvim'添加到您的vimrc文件中。 重新加载您的vimrc或重新启动运行:PlugInstall或类似将Plugin 'larecg/toggle...
Samsung Toggle Mode DDR NAND Specification Samsung Toggle Mode DDR NAND Specification
Samsung Toggle DDR NAND LGA136 定义
簡易元素顯示切換的jQuery plugin套件. A simple function for toggle element visible.
Unity单选菜单(ToggleMenu)
Simple JavaScript Toggle添加了一个按钮,该按钮使您可以控制是否应允许JavaScript在当前站点上运行。 Chrome浏览器具有内置支持,可让您配置应允许哪些网站运行JavaScript。 您可以在Chrome设置页面上执行此操作,...
IOS应用源码之Camera Flash Toggle for iOS.rar
Chrome插件,Toggle-JavaScript,可以知道网页中哪些是JS加载的
Toggle Comment 1.5(VS最好的注释代码插件), Ctrl+/ 快速进行代码注释,方便好用!