DIV隐藏问题

来源:百度知道 编辑:UC知道 时间:2024/09/21 23:28:01
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 15px;
margin-right: 100px;
margin-bottom: 0px;
}
-->
</style>

<script language="javascript" type="text/javascript">

function show(){
if(document.all.lkj.checked)//如果复选框选中
{
document.getElementById("try").style.di

><div style="height:auto""id="try" >
这里的id前怎么会有二个"?去掉一个,id前要有空格.
再说你这个JS里不管lkj 复选框是否选中,动作都是要求div隐藏??这不对吧!