如何防止asp.net在Web浏览器中打开另一个选项卡/窗口?如何限制保留在Web浏览器的同一选项卡中? [英] How to prevent in asp.net from opening another tab/Window in Web Browser? How to restrict to remain in the same tab of web browser?

查看:86
本文介绍了如何防止asp.net在Web浏览器中打开另一个选项卡/窗口?如何限制保留在Web浏览器的同一选项卡中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何防止asp.net在Web浏览器中打开另一个选项卡/窗口?如何限制保留在Web浏览器的同一选项卡中?

紧急请回复。

How to prevent in asp.net from opening another tab/Window in Web Browser? How to restrict to remain in the same tab of web browser?
Urgent please Reply.

推荐答案

您无法从代码控制用户的计算机在服务器上运行,或从网页中运行的代码运行。



你要做的事情是不可能的。



不,这不紧急。
You cannot control the user's computer from code running on the server, or from code running in a web page.

What you are trying to do is impossible.

And no, it's not urgent.


如果您点击任何链接,是否要在同一页面上打开网页而不是新标签?如果是,那么你需要设置超级链接的目标属性通过以下链接,你将了解你需要做什么。



HTML目标属性 [ ^ ]



html - target =& quot; _blank& quot; vs. target =& quot; _new& quot; - Stack Overflow [ ^ ]



如果您不是在寻找这个,请详细说明您的问题,以便任何人都可以回答您的问题。



希望这会有所帮助。
Do you want to open web page on the same page instead of new tab if you click on any link? if yes then you need to set the target property of the hyper link go through the below links you will understand what you need to do.

HTML a target Attribute[^]

html - target="_blank" vs. target="_new" - Stack Overflow[^]

If you are not looking for this please elaborate your question so that any one can give answer to your question.

Hope this will helpful.


如果网站可以阻止用户打开其他标签,请不要你认为每个烦人的点击诱饵和广告媒体网站都会这样做吗?或者所有那些虚假的下载Flash网站等等?如果你从未见过一个网站做某事,那么很可能是不可能的。



如果我知道如何阻止人们在测试中作弊我就不会说你怎么做,我太忙于花十亿英镑。
If it was possible for a website to stop a user opening other tabs, don't you think every annoying click-bait and advert-laiden site would do exactly this? Or all those fake "download Flash" sites etc etc? If you're never seen a site do something then chances are it's not possible.

If I knew a way to stop people cheating on tests I wouldn't be telling you how to do it, I'd be too busy spending my billion pounds.


这篇关于如何防止asp.net在Web浏览器中打开另一个选项卡/窗口?如何限制保留在Web浏览器的同一选项卡中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆