In JQuery, why do I get information Undefined with the following code?
JS - right part is Undefined
var s = $("[name='CountAnswer']").val();
HTML
<input style="width:150px" type="text" id="CountAnswer_1_" name="CountAnswer[1]">
<input style="width:150px" type="text" id="CountAnswer_2_" name="CountAnswer[2]">
<input style="width:150px" type="text" id="CountAnswer_3_" name="CountAnswer[3]">