我有一個簡單的HTML表單是這樣的:獲取和textarea的回聲輸入多次
<form action="index.php" method="post">
<textarea id="question" name="question"></textarea>
<input type="submit"/>
</form>
而且我想它是過程是一樣的東西在這裏描述:
在文本區域的東西,然後點擊提交,結果顯示:
[... the only text area got blank and be ready for new input ...] Question 1: Something typed firstly
鍵入ABO一些其他的事情五個文本區域並提交,結果顯示:
[... the only text area got blank and be ready for new input ...] Question 1: Something typed firstly Question 2: Something typed secondly
等等......
[... the only text area got blank and be ready for new input ...] Question 1: Something typed firstly Question 2: Something typed secondly ... Question n: Something typed at the n time
有沒有人有一個想法,也可以給我一個提示如何使用只有做到這一點HTML和PHP?
非常感謝!
你不能使用javascript? – bassxzero
如果您對javascript設置了死鎖,則可以使用隱藏輸入。這個問題是類似的http://stackoverflow.com/q/33331808/5051310 – Terminus
謝謝@Terminus。我喜歡隱藏輸入的想法,但無法弄清楚,或者你認爲在我的情況下隱藏輸入可能不可能? – nogc