刚才的中文出现乱码了<html>
<head>
<script language="javascript">
function dealBas() {
  if (bas.style.display=="none") {
    bas.style.display = "";
    info.style.display = "none";
    other.style.display = "none";
  }
}
function dealInfo() {
  if (info.style.display=="none") {
    info.style.display = "";
    bas.style.display = "none";
    other.style.display = "none";
  }
}
function dealOther() {
  if (other.style.display=="none") {
    other.style.display = "";
    bas.style.display = "none";
    info.style.display = "none";
  }
}
function init() {
  bas.style.display="";
  info.style.display="none";
  other.style.display="none";
}
init();
</script>
</head><body>
<h3 align="center">知识定义类型</h3>
<table width="778" border="0" align="center" cellpadding="5" cellspacing="0">
  <tr>
    <td><A href="javascript:dealBas()" id="basA">基本信息</A> <A href="javascript:dealInfo()" id="infoA" >用户</A> <A href="javascript:dealOther()" id="otherA">目录</A> <A href="#">模板</A> <A href="#">工作流</A> <A href="#">属性信息</A></td>
  </tr>
</table>
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center">
<tbody id="bas">
  <tr>
    <td>基本信息</td>
    <td><select name="select1" size="4" multiple>
      <option>1</option>
      <option>2</option>
      <option>3</option>
  <option>4</option>
      </select></td>
  </tr>
</tbody>
<tbody id="info">
  <tr>
    <td>用户</td>
    <td><select name="select1" size="4" multiple>
      <option>1</option>
      <option>2</option>
      <option>3</option>
  <option>4</option>
      </select></td>
  </tr>
</tbody><tbody id="other">
  <tr>
    <td>目录</td>
    <td><select name="select1" size="4">
      <option>1</option>
      <option>2</option>
      <option>3</option>
  <option>4</option>
      </select></td>
  </tr>
</tbody>
</table></body>
</html>

解决方案 »

  1.   

    要先加载完后,才能调用.
    所以加入
    <body onload="init();">
    去掉,一开始就在脚本内调用init();ok.<html>
    <head>
    <script language="javascript">
    function dealBas() {
      if (bas.style.display=="none") {
        bas.style.display = "";
        info.style.display = "none";
        other.style.display = "none";
      }
    }
    function dealInfo() {
      if (info.style.display=="none") {
        info.style.display = "";
        bas.style.display = "none";
        other.style.display = "none";
      }
    }
    function dealOther() {
      if (other.style.display=="none") {
        other.style.display = "";
        bas.style.display = "none";
        info.style.display = "none";
      }
    }
    function init() {
      bas.style.display="";
      info.style.display="none";
      other.style.display="none";
    }
    </script>
    </head><body onload="init();">
    <h3 align="center">知识定义类型</h3>
    <table width="778" border="0" align="center" cellpadding="5" cellspacing="0">
      <tr>
        <td><A href="javascript:dealBas()" id="basA">基本信息</A> <A href="javascript:dealInfo()" id="infoA" >用户</A> <A href="javascript:dealOther()" id="otherA">目录</A> <A href="#">模板</A> <A href="#">工作流</A> <A href="#">属性信息</A></td>
      </tr>
    </table>
    <table width="778" border="0" cellspacing="0" cellpadding="0" align="center">
    <tbody id="bas">
      <tr>
        <td>基本信息</td>
        <td><select name="select1" size="4" multiple>
          <option>1</option>
          <option>2</option>
          <option>3</option>
      <option>4</option>
          </select></td>
      </tr>
    </tbody>
    <tbody id="info">
      <tr>
        <td>用户</td>
        <td><select name="select1" size="4" multiple>
          <option>1</option>
          <option>2</option>
          <option>3</option>
      <option>4</option>
          </select></td>
      </tr>
    </tbody><tbody id="other">
      <tr>
        <td>目录</td>
        <td><select name="select1" size="4">
          <option>1</option>
          <option>2</option>
          <option>3</option>
      <option>4</option>
          </select></td>
      </tr>
    </tbody>
    </table>
      

  2.   

    我又加了点东西,麻烦您给看看哪错了<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=GB2312">
    <script language="javascript">
    function dealBas() {
      if (bas.style.display=="none") {
        bas.style.display = "";
        info.style.display = "none";
        other.style.display = "none";
        basA.style.color="#282b8a";
        infoA.style.color="#000000";
        otherA.style.color="#000000";
      }
    }
    function dealInfo() {
      if (info.style.display=="none") {
        info.style.display = "";
        bas.style.display = "none";
        other.style.display = "none";
        infoA.style.color="#282b8a";
        basA.style.color="#000000";
        otherA.style.color="#000000";
      }
    }
    function dealOther() {
      if (other.style.display=="none") {
        other.style.display = "";
        bas.style.display = "none";
        info.style.display = "none";
        otherA.style.color="#282b8a";
        basA.style.color="#000000";
        infoA.style.color="#000000";
      }
    }
    function init() {
      bas.style.display="";
      info.style.display="none";
      other.style.display="none";
      basA.style.color="#282b8a";
      infoA.style.color="#000000";
      otherA.style.color="#000000";
      document.all("infoList").src="/manage/mail/infolist.jsp";
    }
    </script>
    </head><body  onload="init();">
    <h3 align="center">知识定义类型</h3>
    <table width="778" border="0" align="center" cellpadding="5" cellspacing="0">
      <tr>
        <td><A href="javascript:dealBas()" id="basA">基本信息</A> <A href="javascript:dealInfo()" id="infoA" >用户</A> <A href="javascript:dealOther()" id="otherA">目录</A> <A href="#">模板</A> <A href="#">工作流</A> <A href="#">属性信息</A></td>
      </tr>
    </table>
    <table width="778" border="0" cellspacing="0" cellpadding="0" align="center">
    <tbody id="bas">
      <tr>
        <td>基本信息</td>
        <td><select name="select1" size="4" multiple>
          <option>1</option>
          <option>2</option>
          <option>3</option>
      <option>4</option>
          </select></td>
      </tr>
    </tbody>
    <tbody id="info">
      <tr>
        <td>用户</td>
        <td><select name="select1" size="4" multiple>
          <option>1</option>
          <option>2</option>
          <option>3</option>
      <option>4</option>
          </select></td>
      </tr>
    </tbody><tbody id="other">
      <tr>
        <td>目录</td>
        <td><select name="select1" size="4">
          <option>1</option>
          <option>2</option>
          <option>3</option>
      <option>4</option>
          </select></td>
      </tr>
    </tbody>
    </table></body>
    </html>
      

  3.   

    你的infoList是做的什么用呢.是在<iframe></iframe>里面显示的吧.测试通过.<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=GB2312">
    <script language="javascript">
    function dealBas() {
      if (bas.style.display=="none") {
        bas.style.display = "";
        info.style.display = "none";
        other.style.display = "none";
        basA.style.color="#282b8a";
        infoA.style.color="#000000";
        otherA.style.color="#000000";
      }
    }
    function dealInfo() {
      if (info.style.display=="none") {
        info.style.display = "";
        bas.style.display = "none";
        other.style.display = "none";
        infoA.style.color="#282b8a";
        basA.style.color="#000000";
        otherA.style.color="#000000";
      }
    }
    function dealOther() {
      if (other.style.display=="none") {
        other.style.display = "";
        bas.style.display = "none";
        info.style.display = "none";
        otherA.style.color="#282b8a";
        basA.style.color="#000000";
        infoA.style.color="#000000";
      }
    }
    function init() {
      bas.style.display="";
      info.style.display="none";
      other.style.display="none";
      basA.style.color="#282b8a";
      infoA.style.color="#000000";
      otherA.style.color="#000000";
      //document.all("infoList").src="/manage/mail/infolist.jsp";
    }
    </script>
    </head><body  onload="init();">
    <h3 align="center">知识定义类型</h3>
    <table width="778" border="0" align="center" cellpadding="5" cellspacing="0">
      <tr>
        <td><A href="javascript:dealBas()" id="basA">基本信息</A> <A href="javascript:dealInfo()" id="infoA" >用户</A> <A href="javascript:dealOther()" id="otherA">目录</A> <A href="#">模板</A> <A href="#">工作流</A> <A href="#">属性信息</A></td>
      </tr>
    </table>
    <table width="778" border="0" cellspacing="0" cellpadding="0" align="center">
    <tbody id="bas">
      <tr>
        <td>基本信息</td>
        <td><select name="select1" size="4" multiple>
          <option>1</option>
          <option>2</option>
          <option>3</option>
      <option>4</option>
          </select></td>
      </tr>
    </tbody>
    <tbody id="info">
      <tr>
        <td>用户</td>
        <td><select name="select1" size="4" multiple>
          <option>1</option>
          <option>2</option>
          <option>3</option>
      <option>4</option>
          </select></td>
      </tr>
    </tbody><tbody id="other">
      <tr>
        <td>目录</td>
        <td><select name="select1" size="4">
          <option>1</option>
          <option>2</option>
          <option>3</option>
      <option>4</option>
          </select></td>
      </tr>
    </tbody>
    </table>
    加了个iframe
    <iframe name="infoList" src=""></iframe>
    </body>
    </html>
      

  4.   

    大哥谢谢您了,可以加我一个msn吗,[email protected]