2016-08-13 67 views
-5
<?php 

while($f = mysql_fetch_array($res)) 
{ 
    // print_r($f); 
    echo "<td><a href='edit_main.php?id=$f[id]' onclick='javascript:void' window.open('edit_main.php?id=$f[id]','1471058128633','width=700,height=500,toolbar=0,menubar=0,location=1,status=1,scrollbars=1,resizable=1,left=0,top=0');return false;'><i class='fa fa fa-hdd-o fa_sett fa-2x'></i></a></td>"; 
} 

我希望它在一個彈出窗口中打開。創建一個彈出窗口用PHP輸出它?

+1

沒有不那樣。你將需要使用JavaScript來做到這一點。 – RiggsFolly

+0

只需付出一點努力,您就可以使其工作。 – jpaljasma

+0

爲什麼你在使用已棄用的庫 –

回答

2

您可以使用下面的代碼爲您的解決方案。

<?php 

while($f = mysql_fetch_array($res)) 
{ 
    // print_r($f); 
    echo "<td><a href='#' onclick=\"window.open('edit_main.php?id=$f[id]','','width=700,height=500,toolbar=0,menubar=0,location=1,status=1,scrollbars=1,resizable=1,left=0,top=0');return false;\"><i class='fa fa fa-hdd-o fa_sett fa-2x'></i></a></td>"; 
} 

我希望這個解決方案對您有所幫助。

+0

感謝@chirag patel,現在工作正常。 還有一件事你能告訴我如何在這個彈出窗口中隱藏工具欄地址嗎? – levin