javascript-在新窗口中打开框架

问题描述

| 我有一个页面显示在框架中,作为另一个站点的一部分。我想向该页面添加一个链接,该链接将允许用户在新窗口(即框架外)中打开页面。我该怎么做呢? 我尝试使用
<a href=\"javascript:window.location.href\" target=\"_blank\">Remove frame</a>
但这不起作用,只打开了一个地址为“ 1”的新窗口     

解决方法

        
<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>