![](/img/trans.png)
[英]the second php form disappears when second submit button is pressed but the first form remains
[英]is there a way to render a form when a button is pressed ? PHP
我在核心 PHP 中尋找一些幫助。我想知道如何在按下按鈕時在 window 中顯示表單。 它應該像 react 或 svelte 等中的條件渲染。我不想使用任何框架 laravel。
您可以使用一個按鈕並通過這樣的 url 打開其他頁面
<button type="button" onclick='"location.href="someurl.php?someparams"'>Some button</button>
onclick
上的單引號表示雙引號來源正確。 按鈕上的“類型”作為按鈕是這樣的,如果將其包含在表單中,則表單不會將其與提交行為混淆。
希望這有幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.