sytle.display注意大小写
=============================
<HTML>
<HEAD>
<title>check_type_list</title>
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<script language="javascript">
function expand_onclick_handler()
{
toggleExpandDataView();
}
//
// Expands or collapses the list based on the interaction with the expand/collapse glyph.
//
function toggleExpandDataView()
{
var oMTData=document.getElementById("tr_queryration");
var oCollapso=document.getElementById("oCollapso");
if(oCollapso.state == "collapsed"){
// the state is collapase so force environment to be expanded.
oCollapso.title = "折叠综合查询条件";
oMTData.style.display = "inline";
oCollapso.src = "../images/UI_OM_collapse.gif";
oCollapso.state = "expanded";

// now that the view is being expanded, must save this state.
//goPersist.SetAttribute("expanded", "true");
} else {
// the state is expanded so force environment to be expanded.
oCollapso.title = "展开综合查询条件";
//oMTData.style.DISPLAY = "inline";
oMTData.style.display = "none";
oCollapso.src = "../images/UI_OM_expand.gif";
oCollapso.state = "collapsed";
}
} </script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<TABLE id="Table1" cellSpacing="1" cellPadding="1" border="1">
<TR>
<TD style="HEIGHT: 26px">
<TABLE id="Table3" style="WIDTH: 100%; HEIGHT: 26px">
<TR>
<td align="right">
<IMG id="oCollapso" src="../images/UI_OM_expand.gif" onclick="expand_onclick_handler()" title="展开综合查询条件" state="collapsed" style="CURSOR:hand" width="21" height="18">
</td>
</TR>
</TABLE>
</TD>
</TR>
<TR style="DISPLAY: none" id="tr_queryration">
<TD style="HEIGHT: 26px">
<TABLE id="Table4" style="WIDTH: 100%; HEIGHT: 100%">
<TR> <TD >类型名称</TD> <TD>类型图例</TD><TR></TABLE></TD></TR></TABLE>
</form>
</body>
</HTML>

解决方案 »

  1.   

    把下面这个函数改一下
    function toggleExpandDataView()
    {
    var oMTData=document.getElementById("tr_queryration");
    var oCollapso=document.getElementById("oCollapso");
    if(oCollapso.state == "collapsed"){
    // the state is collapase so force environment to be expanded.
    oCollapso.title = "折叠综合查询条件";
    oMTData.style.display = "";
    oCollapso.src = "../images/UI_OM_collapse.gif";
    oCollapso.state = "expanded";

    // now that the view is being expanded, must save this state.
    //goPersist.SetAttribute("expanded", "true");
    } else {
    // the state is expanded so force environment to be expanded.
    oCollapso.title = "展开综合查询条件";
    //oMTData.style.DISPLAY = "inline";
    oMTData.style.display = "none";
    oCollapso.src = "../images/UI_OM_expand.gif";
    oCollapso.state = "collapsed";
    }
    }