window.location改称window.href.location试试

解决方案 »

  1.   

    <script language=javascript> 
    var retValue=window.confirm('您確認要滙出全部的資料?');
    if(retValue)
    {
    window.location.href='../colligate/Light_WSLWExportSelect.aspx?sql= select Light_WSLWid from Light_WSLW where Votar_Family='20075628' order by Upbuild_Time desc &URLS=../info/Light_WSLW.aspx';
    }
    else
    {

    </script>
      

  2.   

    还有'../colligate/Light_WSLWExportSelect.aspx?sql= select Light_WSLWid from Light_WSLW where Votar_Family='20075628' order by Upbuild_Time desc &URLS=../info/Light_WSLW.aspx'外面这对''改成""
      

  3.   

    我位置写错了 Ischema(花客)的对
      

  4.   

    <script language=javascript> 
    var retValue=window.confirm('您確認要滙出全部的資料?');
    if(retValue)
    {
    window.location.href='../colligate/Light_WSLWExportSelect.aspx?sql=select * from Light_WSLW where (Item_Num like '%23%' AND (WSLW_Time >= '1900-01-01' AND WSLW_Time <= '2007-5-20') AND Virtuous='aaa')&URLS=../info/Light_WSLW.aspx';
    }
    else{} 
    </script>又报缺少; 我应该怎么做
      

  5.   

    这对''改成""我到下个页面还要用这个SQL语句呢
      

  6.   

    又报缺少; 我应该怎么做
    那就是你那条语句没有写对 还是‘’的问题
    window.location.href=‘’改成window.location.href=“”
      

  7.   

    <script language=javascript> 
    var retValue=window.confirm('您確認要滙出全部的資料?');
    if(retValue)
    {
    window.location.href="../colligate/Light_WSLWExportSelect.aspx?sql=select * from Light_WSLW where (Item_Num like '%23%' AND (WSLW_Time >= '1900-01-01' AND WSLW_Time <= '2007-5-20') AND Virtuous='aaa')&URLS=../info/Light_WSLW.aspx";
    }
    else{} 
    </script>
      

  8.   

    后台代码
    Page.RegisterStartupScript("alert","<script language=javascript> var retValue=window.confirm('您確認要滙出全部的資料?');if(retValue){window.location.href='../colligate/Light_WSLWExportSelect.aspx?sql="+lblSql.Text+"&URLS=../info/Light_WSLW.aspx';}else{} </script>");主要是 lblSql.Text 里缺少分号 应该怎么解决呢
      

  9.   

    问题找到了  是 window.location.href='...'  
    ...里不能再有单引号  这怎么解决呢
      

  10.   

    解决了 谢谢楼上的朋友Page.RegisterStartupScript("alert","<script language=javascript> var retValue=window.confirm('您確認要滙出全部的資料?');if(retValue){window.location.href=\"../colligate/Light_WSLWExportSelect.aspx?sql="+lblSql.Text+"&URLS=../info/Light_WSLW.aspx\";}else{} </script>");window.location.href= \"   .....   \"  这样就不报错误了