试图在新窗口中打开一个点击元素

我有一个来自页面上嵌入部分的按钮,该按钮链接到我想在新窗口中打开内容的表单,但目前,该页面在嵌入部分内打开

当然,我试过了,target=_blank但似乎没有用。我试过了,onClick="location.href='embed_newstore.php'"但这也不起作用。

<input type="button" name="op" onclick="document.location.href='embed_newstore.php'" id="edit-submit" value="<?php echo $lang['REQUEST_ADD_STORE']; ?>" class="btn btn-primary" style="color:white !important;" target="_blank"/>

预期:embed_newstore.php 在新窗口/选项卡中打开

实际:embed_newstore.php 在嵌入应用程序容器中打开


SMILET
浏览 158回答 2
2回答

慕工程0101907

试试onclick="window.open('embed_newstore.php');"

Helenr

试试这个onclick="window.open('&nbsp;http://localhost/embed_newstore.php&nbsp;');"仅当按钮不在表单标签内时才有效
打开App,查看更多内容
随时随地看视频慕课网APP