简体   繁体   中英

Show Asp.Net Page By Using Javascript

Is it possible in javascript to open new aspx page by using javascript?.

I mean if I wants to open a new page in asp.net than I will use "Server.Transfer" method to open new aspx page the same thing I am asking over here to open new aspx page by using javascript.

Is it possible?.

I am trying as per your suggestion as below:

<script type="text/javascript">
$(document).ready(function()
{
  function kpr(e)
  {
    if(e.which==17 && e.which==18 && e.which==82 || e.keyCode==17 && e.keyCode==18 &&   e.keyCode==82)
    {
      window.location.href="MemberInfo.aspx";
    }
  }
});
</script>

but it not allowed me to show new page as above........

如下所示(在脚本的适当位置):

window.location.href = "OtherPage.aspx"

在客户端功能中尝试以下操作:

window.location.assign("Page.aspx")

尝试使用浏览器的调试工具,并在函数中设置检查点,以确保它确实到达window.location.href行。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM