在OnMouseUp='turnIt(layer2073,img2073,indent2073);'
img2073是id
而你是要将这个对象传进来。
用document.all.item("img2073")代替img2073试试。
此外代码中有关于这样的都作同样的处理。

解决方案 »

  1.   

    根据你的意思,我把JS代码改成:<script language="javascript">
    <!--
    function turnIt(layer,img,indent)
    {
    if (document.all.item(layer).style.display=="none") {
    document.all.item(layer).style.display = "block";
    document.all.item(indent).style.display = "block";
    document.all.item(img).src = "minus.gif";
    else {
    document.all.item(layer).style.display = "none";
    document.all.item(indent).style.display = "none";
    document.all.item(img).src = "plus.gif";
    }
    }function turnOut(content)
    {
    document.all.item(content).style.display = document.all.item(content).style.display=="none"?"block":"none";
    }
    //-->
    </script>好象还是不行。
      

  2.   

    函数调用的参数要加引号,比如说:
    turnIt(layer2073,img2073,indent2073);
    改成
    turnIt("layer2073","img2073","indent2073");
      

  3.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head><script language="javascript">
    //<!--
    function turnIt(layer,img1,indent)
    {
    if (layer.style.display=="none") {
    layer.style.display = "";
    indent.style.display = "";
    img1.src = "minus.gif";
    }
    else {
    layer.style.display = "none";
    indent.style.display = "none";
    img1.src = "plus.gif";
    }
    }function turnOut(content)
    {
    content.style.display = content.style.display=="none"?"":"none";
    }</script>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <Title>BBS Using M$ SQL Server 2000</Title>
    </Head>
    <Body>
    <table border="0">
    <tr>
    <td language='JavaScript' OnMouseUp='turnIt(layer2073,img2073,indent2073);' style='CURSOR:hand'>
    <img id=img2073 src='plus.gif' width='9' height='9'>
    </td>
    <td id=title2073 language='JavaScript' OnMouseUp='turnOut(content2073);' style='CURSOR:hand'>
    为什么诺顿杀毒那么慢啊!
    </td>
    </tr>
    <tr>
    <td colspan=2 id=content2073 style='DISPLAY:none'>
    <table boder='0' bgcolor='grey'>
    <tr>
    <td>
    </td>
    <td>
    为什么诺顿杀毒那么慢啊!&lt;BR&gt;我的是WIN-XP,为了内存和速度只好用这个啊!
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td id=indent2073 style='DISPLAY:none'>
    </td>
    <td id=layer2073 style='DISPLAY:none'>
    <table border='0'>
    <tr>
    <td>
    <img id=img4048 src='minus.gif' width='9' hight='9'>
    </td>
    <td id=title4048 language='JavaScript' OnMouseUp='turnOut(content4048);'Style='CURSOR:hand'>
    Re:为什么诺顿杀毒那么慢啊!
    </td>
    </tr>
    <tr>
    <td colspan=2 id=content4048 style='DISPLAY:none'>
    <table boder='0' bgcolor='grey'>
    <tr>
    <td>
    </td>
    <td>
    是的,诺顿杀毒是慢,不过驻留占用较少,查毒好,还是优选的一种杀毒软件
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    <table border='0'>
    <tr>
    <td>
    <img id=img4049 src='minus.gif' width='9' hight='9'>
    </td>
    <td id=title4049 language='JavaScript' OnMouseUp='turnOut(content4049);'Style='CURSOR:hand'>
    Re:为什么诺顿杀毒那么慢啊!
    </td>
    </tr>
    <tr>
    <td colspan=2 id=content4049 style='DISPLAY:none'>
    <table boder='0' bgcolor='grey'>
    <tr>
    <td>
    </td>
    <td>
    普通用户还是不要用xp了,太浪费资源
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table></Body>
    </Html>
      

  4.   

    缺少一个 }
    变量img写成其他得名字