我正在开发Web应用程序,想知道是否有一种使用HTML在应用类型窗口中打开链接的方法?类似这样:
<a href="link" target="_app">My App</a>
我正在开发Web应用程序,想知道是否有一种使用HTML在应用类型窗口中打开链接的方法?类似这样:
<a href="link" target="_app">My App</a>
类似这样吗?
<a href="#" onClick="MyWindow=window.open('http://www.google.com','MyWindow','width=600,height=300'); return false;">Click Here</a>
<a href="#" onClick="MyWindow=window.open('http://www.google.com','MyWindow','width=600,height=300'); return false;">点击这里</a>
。 - thebjornHTML
单独无法实现此功能。您需要使用一些JS
。
还要考虑到现在人们在浏览器中使用弹出窗口拦截器。
<a href="javascript:window.open('document.aspx','mypopuptitle','width=600,height=400')">open popup</a>
我感觉这是最简单的方法。(随意更改宽度和高度值)。
<a href="http://www.google.com"
target="popup"
onclick="window.open('http://www.google.com','popup','width=600,height=600'); return false;">
Link Text goes here...
</a>
target="popup"
不是该属性的有效值。https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/a#target - Luigi <a onclick="window.open('/Product/Product', 'popup', 'location=0,width=750,height=650,left=500,top=55'); return false;" class="btn btn-primary btn-sm">+</a>