我有一个使用Bootstrap 3的网页。在这个页面中,我需要一个文本区域,人们可以在其中输入他们的答案。这个答案是针对一个故事问题的。这个故事问题出现在一个模态对话框中。设置可以在这个Bootply中看到。代码如下:
<div class="container">
<form>
<div class="form-group">
<label>Answer (<a id="showProblemLink" href="#">view problem</a>)</label>
<textarea class="form-control" rows="7"> </textarea>
</div>
</form>
<div id="problemModal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
<p>
The local school wants a new playground.
The lot they can use for the playground is shaped like a rectangle.
The school has decided to let the students design the new playground.
The students have decided that they want 1/4 of the playground to be a football field.
Another 3/8 of the lot will be used for a basketball court.
How much of the lot is remaining for the slides and swings?
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
我的用户希望在他们输入答案时可以保持故事问题在模态窗口中打开,这样他们可以检查答案。明显的解决方法是让他们重新打开对话框。但是,显然,这还不够好。我真的需要保持对话框打开,并让用户在其后/下面的文本区域中输入数据。这对我来说似乎很奇怪。但是,这就是我必须要做的。
我的问题是,当我单击
textarea
。 - user687554