我有一个包含三个textarea.I的表单,如果其中一个textarea被点击,我想提交我的表单。如何在点击textarea时提交表格
<form action="" method="post">
<div class="time">
<div class="time-control">
<div class="tcont-in">
<p>Morning</p>
<textarea name="time" id="foo" style="color: white; background-color: black; height:30px;position: absolute;left:608px" readonly>05PM-12PM</textarea>
</div>
</div>
<div class="time-control">
<div class="tcont-in">
<p>Afternoon</p>
<textarea name="time2" id="foo1" style="color: white; background-color: black; height:30px; position: absolute;left:608px" readonly>12PM-05PM</textarea>
</div>
</div>
<div class="time-control">
<div class="tcont-in">
<p>Evening</p>
<textarea name="time3" id="foo2" style="color: white; background-color: black; height:30px; position: absolute;left:608px" readonly>05PM-10PM</textarea>
</div>
</div>
</div>
<div class="check-control">
<div class="pref-checkbox">
<div class="checkbox-time">
<input type="checkbox" value="No" id="checkboxFourInput" name="Preference" checked="" />
<label for="checkboxFourInput"></label>
</div>
<h3>No Preference</h3>
</div>
</div>
<div class="">
<button type="submit" name="submit" value="submit" class="btn-next">NEXT</button>
</div>
</div>
</form>
为什么你不只是让他们提交按钮?不管你想要什么样式,他们都可以看起 – epascarello
好像你正在试图哄骗用户。 xD – Script47
如果您包括为什么要这样做,它可能会有所帮助。为了回答你的问题,这不是必要的,但它似乎是一个直观的用户界面,当用户点击文本区域时提交。用户希望能够编辑文本区域。 –