Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 打开一个新选项卡并单击链接_C#_Html_Asp.net - Fatal编程技术网

C# 打开一个新选项卡并单击链接

C# 打开一个新选项卡并单击链接,c#,html,asp.net,C#,Html,Asp.net,因此,使用下面的链接,当用户单击“条款和条件”时,我希望T&C页面在单独的浏览器中打开。ATM it会重新加载带有T&C页面的浏览器。我以为“空白”打开了一个新标签 <p> Accept the <a href="~/TermsAndConditions" target=\"_blank\"> <span class="big-red">Terms and Conditions</span> </a> &l

因此,使用下面的链接,当用户单击“条款和条件”时,我希望T&C页面在单独的浏览器中打开。ATM it会重新加载带有T&C页面的浏览器。我以为“空白”打开了一个新标签

<p>
     Accept the <a href="~/TermsAndConditions" target=\"_blank\">
     <span class="big-red">Terms and Conditions</span>
     </a>
</p>

接受

您无法在单独的浏览器中打开新选项卡 在单独的浏览器中打开一个新选项卡是不可能的,我假定您指的是同一浏览器的一个新窗口

您不需要
\“
转义qoutes 请注意,一旦进入qoutes,您需要逃离qoutes,例如:

"<a href=\"href\"></a>"
在JS文件中,如下所示:

function newwin () {
   window.open("link"); // ~/termsandconditions
}
PS,
target=“\u blank”
会打开一个新选项卡
但是,
target=“\u blank”
会打开一个新选项卡!:)这样就可以了。

是的,但是为什么要转义引号呢?请查看
onclick="newwin()" // in the a tag
function newwin () {
   window.open("link"); // ~/termsandconditions
}