javascript - How can I use the window.close() inside a href? -


how can use window.close() inside

im trying add window.close() inside href. code matter

    while(mysqli_stmt_fetch($stmt)) {     echo "<tr>";     echo "<th>".sprintf("%s", $col2)."</th>";     echo "<th>".sprintf("%s", $col3)."</th>";     echo "<th>".sprintf("%s", $col4)."</th>";     echo "<th>".sprintf("%s", $col18)."</th>";     echo "<th>".sprintf("%s", $col19)."</th>";     echo "<th><a target='_blank' href='review.php?id=$col1'>click</a></th>";     echo '</tr>';   } 

im trying add window.close() in line

echo "<th><a target='_blank' href='review.php?id=$col1'>click</a></th>"; 

i hope can help. thank you

i think looking this.

<a href="javascript:window.close();">close window</a> 

in case:

echo '<th><a target="_blank" href="javascript:window.close();">click</a></th>'; 

Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -