[英]javascript - open frame in new window
我有一個頁面作為另一個站點的一部分顯示在框架中。 我想添加一個指向此頁面的鏈接,該鏈接將允許用戶在新的 window 中打開頁面,即超出框架。 我該怎么做呢?
我試過使用
<a href="javascript:window.location.href" target="_blank">Remove frame</a>
但這不起作用,只打開了一個新的 window,地址javascript:window.location.href
<input onclick="javascrpt:window.open(window.location.href);" type="button" value="your value here" />
嘗試:
<a href="javascript:window.location='whereiwanttogo.html';" target="_blank">
你可以使用它,它對我有用:
<a href="javascript:window.open(window.location.href);return true;" target="_blank">Printable version</a>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.