<script language="javascript" type="text/javascript">
    <!--
        function openwin()
        {
            window.open('WarehouseEdit.aspx','newwarehouse','height=100, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no')
        }
    -->
    </script>
 <td style="width:100px;">
                    <a href="#" onclick="openwin()">添加仓库</a></td>代码如上,为什么单击的时候只能在新标签中打开'WarehouseEdit.aspx'  ,而不是在当前标签中打开?我要的是在当前标签中打开!谢谢!!

解决方案 »

  1.   

    指定href不就行了吗…… 
    <td style="width:100px;">
                        <a href="WarehouseEdit.aspx">添加仓库</a></td>
      

  2.   

    window.open('WarehouseEdit.aspx','newwarehouse','_self','height=100, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no')
      

  3.   

            function openwin()
            {
                location.href="WarehouseEdit.aspx"
            }