我用敲除和得到了我的模型视图模板这些回来......不能得到文本区域的价值
<div class="both">
<td>
<h3 data-bind="text: MyText"> What type of fruit is healthy ?</h3>
<textarea data-bind="attr:{id: Question}" class="my-response" id="1"> this is my text area value </textarea>
</td>
</div>
<div class="both">
<td>
<h3 data-bind="text: MyText"> What type of Veg is healthy ?</h3>
<textarea data-bind="attr:{id: Question}" class="my-response" id="2"> this is my text area value</textarea>
</td>
</div>
我想要得到文本区域的价值,这是行不通的..
$('.both').each(function() {
alert($('.my-response').val());
});
我该怎么做?
感谢
你肯定对HTML格式? – 2012-07-11 19:47:08
尽管使用它来绑定,但您似乎没有充分利用淘汰赛获取您的模型信息。你确定你需要用jQuery收集这些信息吗? – Tyrsius 2012-07-11 21:57:40
绑定你的textareas的值:绑定,你/不需要jQuery来访问值! – thomaux 2012-07-12 08:20:40