PHP 按鈕如何在同一行顯示?

2010-12-25 1:13 am
echo "<form name=\"form\" method=\"post\" action=\"logout.php\">";
echo "<input type=\"submit\" name=\"button\" value=\"Logout\" />";
echo "</form>";
echo "<form name=\"form\" method=\"post\" action=\"add0.php\">";
echo "<input type=\"submit\" name=\"button\" value=\"Add\" />";
echo "</form>";

我的代碼大致如上,但運行時卻跳到下一行
請問如何才能在同一行顯示 Logout 和 Add 的按鈕呢? THX~

回答 (1)

2010-12-25 5:39 am
✔ 最佳答案
用表格咪得lo

<?php
echo "<table>";
echo "<tr>";
echo "<td>";
echo "<form name=\"form\" method=\"post\" action=\"logout.php\">";
echo "<input type=\"submit\" name=\"button\" value=\"Logout\" />";
echo "</form>";
echo "</td>";
echo "<td>";
echo "<form name=\"form\" method=\"post\" action=\"add0.php\">";
echo "<input type=\"submit\" name=\"button\" value=\"Add\" />";
echo "</form>";
echo "</td>";
echo "</tr>";
echo "</table>";
?>
不過好囧...
參考: 我


收錄日期: 2021-04-23 18:27:40
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20101224000051KK00969

檢視 Wayback Machine 備份