我有一個(gè)來自頁面上嵌入部分的按鈕,該按鈕鏈接到我想在新窗口中打開內(nèi)容的表單,但目前,該頁面在嵌入部分內(nèi)打開當(dāng)然,我試過了,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"/>預(yù)期:embed_newstore.php 在新窗口/選項(xiàng)卡中打開實(shí)際:embed_newstore.php 在嵌入應(yīng)用程序容器中打開
2 回答

Helenr
TA貢獻(xiàn)1780條經(jīng)驗(yàn) 獲得超4個(gè)贊
試試這個(gè)
onclick="window.open(' http://localhost/embed_newstore.php ');"
僅當(dāng)按鈕不在表單標(biāo)簽內(nèi)時(shí)才有效
- 2 回答
- 0 關(guān)注
- 171 瀏覽
添加回答
舉報(bào)
0/150
提交
取消