当我点击一个下载链接的时候,判断是否有积分下载,不能下载或能下载都希望他回原来的页面。js脚本该怎么写?是response.write(<script>javascript:alert('下载成功');window.location='webform.aspx'</script>)是这样吗?目前弹出框是有了,但是刷新不执行了

解决方案 »

  1.   

    window.location.href = "webform.aspx"
      

  2.   

    window.location.href试过了貌似不行呀。
      

  3.   

    <script type='text/javascript'>alert('下载成功');window.location.href='webform.aspx'</script>
      

  4.   

    <script type='text/javascript'>alert('下载成功');window.location.href='webform.aspx'</script>代码写的
      

  5.   

    不行,你那分号我改了也不行。反正chorme IE8 不行
      

  6.   

    response.write("<script type='text/javascript'>alert('下载成功');window.location.href='webform.aspx'</script>");
      

  7.   

    response.write("<script type='text/javascript'>alert('下载成功');window.location.href='webform.aspx'</script>");偶就是这样写的,但是就是不对么。大哥你的方式我都试过了。
      

  8.   

    response.write("<script language='javascript'>");
    response.write("alert('下载成功');");
    response.write("window.location.href='webform.aspx'");
    response.write("</script>");
    response.end();
    注意你跳转页面和webform.aspx的路径问题!!
      

  9.   

    window.location.href = "webform.aspx"