0
我在Play框架中使用scala模板來創建我的視圖。如何從Play框架中的HTML文本區域獲取值?
用戶需要在文本區域輸入一些文本。我想在我的應用程序中使用此文本發送到另一個視圖。
<div class="ui form">
<div class="field">
<label>Please use the text box below</label>
<textarea>//this is the text that i need to grab</textarea>
</div>
@pet_order(petId, //this is where i send in the text)
</div>
誰能給我就如何實現這一目標一些建議嗎?
謝謝你的解釋 - 我最終最終這樣做了,所以這是正確的答案。我必須弄清楚一件小事 - 我有一個int變量,我想用表單發送。我這樣做的方式是在表單中添加一個新字段,將該變量的值添加到該字段(value =「my value」),然後通過隱藏該字段使其成爲「不可見」。這使我可以用表單發送變量 –