|
藍森林 http://www.lslnet.com 2006年8月25日 8:28
求救求救~~~關於屬性查看問題
我定義了一個表格屬性是不可見的,然後通過點擊一個鏈接使這個表格可見,可是我想先確定一下這個表格當前的屬性是可見還是不可見,如果可見,則點這個鏈接就使其不可見,如果不可見,就使其可見,這個語句應該怎麼寫?我的代碼如下:運行時總提示"缺少對像"~~
if lc1.style.display="none" then
response.Write "lc1.style.display=' '; "
else response.write "lc1.style.display='none'; "
end if
|
你研究一下這個
[html]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>折疊式內容展示 .::MHCY工作室 Http://mhcy.51.net 收集::.</title>
<link href="../../include/style.css" rel="stylesheet" type="text/css">
<!-- 代碼-->
<SCRIPT language=JavaScript>
function actMenu(menuid)
{
try
{
var menuidobj = eval(menuid)
if(menuidobj.style.display=='none')
{
try
{
menu1.style.display='none';
menu2.style.display='none';
}
catch(e)
{}
menuidobj.style.display='';
Set(menuid);
menucookie = menuid;
}
else
{
menuidobj.style.display='none';
Set("none");
}
}
catch(e)
{}
}
</SCRIPT>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25" bgcolor="#FF0000"> <div align="center"><font color="#FFFF00"><strong>MHCY工作室
Http://mhcy.51.net 收集</strong></font></div></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td bgcolor="#F7F7F7">· <A href="javascript:actMenu('menu1')">問題一</A></td>
</tr>
<tr id=menu1 style="DISPLAY: none">
<td bgcolor="#FFFFFF"><TABLE cellSpacing=0 cellPadding=0 width="95%" align=center
border=0>
<TBODY>
<TR>
<TD class=y-blue-duan colSpan=3> <DIV align=left>文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明<BR>
</DIV></TD>
</TR>
<TR>
<TD bgColor=#ffffff colSpan=3><IMG height=1 src=""
width=1 border=0></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
<tr>
<td bgcolor="#F7F7F7">· <A href="javascript:actMenu('menu2')">問題二</A></td>
</tr>
<tr id=menu2 style="DISPLAY: none">
<td bgcolor="#FFFFFF"><TABLE cellSpacing=0 cellPadding=0 width="95%" align=center
border=0>
<TBODY>
<TR>
<TD height=29> <DIV align=left>文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明文字說明</DIV></TD>
</TR>
<TR>
<TD bgColor=#ffffff><IMG height=1 src="" width=1
border=0></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
</tr>
</table>
</body>
</html>
[/html] |
謝謝樓上的,搞定了. |
|