我想在點擊這個按鈕后調(diào)用函數(shù)function query();來查詢數(shù)據(jù)庫并將結(jié)果顯示出來,應(yīng)該怎樣在PHP中實現(xiàn)點擊按鈕來調(diào)用query():函數(shù)呢?<?phpfunction query(){echo "<script language=\"JavaScript\">alert(\"haha!\");</script>";}if($_POST["do"]=="yes"){query();}?><input type="button" value="按鈕" onclick="javascript:cmdclick()"/><script type="text/javascript">function cmdclick(){document.location.href="?do=yes";}</script>
點擊按鈕毫無反應(yīng)是什么原因呢?
30秒到達(dá)戰(zhàn)場
2022-11-19 21:17:34