Как смоделировать target = & ldquo; _blank & rdquo; в JavaScript

140
задан Matt 15 October 2009 в 18:05
поделиться

2 ответа

<script>
    window.open('http://www.example.com?ReportID=1', '_blank');
</script>

The second parameter is optional and is the name of the target window.

279
ответ дан 23 November 2019 в 22:29
поделиться

You can extract the href from the a tag:

window.open(document.getElementById('redirect').href);
2
ответ дан 23 November 2019 в 22:29
поделиться
Другие вопросы по тегам:

Похожие вопросы: