window.onload = function(){document.getElementById("a").style.display="none";}function chk()
{
if(XXXX.checked)
{
document.getElementById("b").style.display="none";
document.getElementById("a").style.display="";
}
}
{
if(XXXX.checked)
{
document.getElementById("b").style.display="none";
document.getElementById("a").style.display="";
}
}
解决方案 »
- 关于google map中读取xml文件中经纬度的问题
- js调用输出 网站源码乱码但显示没问题 如何解决?
- 【求助ExtJs】comboBox不能加载JsonStore读取的数据
- 求一个jquery的上传插件,最好带jsp示例,急用,谢谢
- 每次加载SSH工程的时候总会加载上asm-2.2.3.jar这个包,删掉了也不行,该怎么办呢?
- 关于处理图片的问题
- javaScript中如何获取鼠标在屏幕中的位置?
- 动态添加table成功,但是不知道怎么动态删除添加的table!请大家指教!急!
- 如何向列表框中添加内容?急!
- 怎样知道客户端使用的是大字体还是小字体!!!
- 脚本中弹出DIV窗口的问题
- 新手上路 基础问题
<head>
<title></title>
<script>
function show()
{
if(ck.checked)
{
A.style.display="";
B.style.display="none";
}
else
{
A.style.display="none";
B.style.display="";
}
}
</script>
</head>
<body>
<div id="A" style="width:100px;display:none;height:80px;background-color:red">
adfssdfsdf
</div> <div id="B" style="width:100px;height:80px;background-color:blue">
sdfsdfds
</div> <input type="checkbox" id="ck" onclick="show()"/>选择
</body>
</html>
<head>
<title></title>
<script>
function show()
{
if(ck.checked)
{
A.style.display="";
B.style.display="none";
}
else
{
A.style.display="none";
B.style.display="";
}
}
</script>
</head>
<body>
<div id="A" style="width:100px;display:none;height:80px;background-color:red">
AAAAAAAAAAAAAA
</div> <div id="B" style="width:100px;height:80px;background-color:blue">
BBBBBBBBBBBBBBBB
</div> <input type="checkbox" id="ck" onclick="show()"/>选择
</body>
</html>
<html>
<head>
<title> </title>
<script>
function show()
{
if(ck.checked)
{
A.style.display="visiblity";
B.style.display="none";
}
else
{
A.style.display="none";
B.style.display="visiblity";
}
}
</script>
</head>
<body>
<div id="A" style="width:250px;display:none;height:2000px;">
adfssdfsdf
</div> <div id="B" style="width:100px;height:80px;>