开发者

PageRedirect to previous Page?

开发者 https://www.devze.com 2023-02-25 16:55 出处:网络
I have a page(A) that has a popup. When th开发者_高级运维e link in the popup is clicked, it takes you to page B. Page B has a Submit and cancel button. Cancel button should get me back to Page A. How

I have a page(A) that has a popup. When th开发者_高级运维e link in the popup is clicked, it takes you to page B. Page B has a Submit and cancel button. Cancel button should get me back to Page A. How is it possible with javascript or Asp.net??

Thank you in advance!!


You can use the history object to navigate backwards:

<input type="button" value="Cancel" onClick="history.back()">

This has the same effect as if the user clicked the back button on their browser.


<button name="cancel" onclick="history.go(-1)">Cancel</button>
0

精彩评论

暂无评论...
验证码 换一张
取 消