[英]Primefaces open page in new tab on button click
我有这个
<h:outputLink value="http://.....index.html"
target="_blank">open</h:outputLink>
但它显示像链接。 我怎样才能创建这个按钮? 我需要按钮“打开”。 当我按下此按钮时,我需要在浏览器的新选项卡中打开我的链接。
请提及我们也使用的PF版本,如下所示,它适用于旧版本试试让我们知道
<p:button value="Open" href="http://.....index.html" target="_blank" />
您可以使用<p:button>
或<p:commandButton>:
执行以下两种方法之一<p:commandButton>:
<p:commandButton value="Open" action="index.html" ....other optional attributes/>
<p:button value="Open" outcome="http://.....index.html" >
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.