首页 文章

如何使用html在新窗口中打开链接? [重复]

提问于
浏览
2

这个问题在这里已有答案:

我想在新窗口中打开链接而不是新标签 . 我在目标中使用了“_blank”和“_new”但它不起作用,它在新窗口中打开 .

<a href="allskills.php" style="text-decoration:none" target="_new">All Skills</a>
or
<a href="#" style="text-decoration:none" onClick="window.open('allskills.php', '_blank')">All Skills</a>

有没有办法在新窗口中打开?

谢谢

2 回答

  • 1

    DEMO FIDDLE

    试试这个

    popupWin = window.open('http://webdesign.about.com/',
    'open_window',
    'menubar, toolbar, location, directories, status, scrollbars, resizable,
    dependent, width=640, height=480, left=0, top=0')
    
  • 1

    FF使用标签 . 新窗口,您只能使用Javascript打开: window.open('example.html', 'name', 'settings')

    http://www.w3schools.com/js/tryit.asp?filename=try_win_focus

相关问题