Hi guys i am trying to get the image value from my input using jquery but it is showing value as undefined
Here is my input
<input placeholder="image" class="width-dynamic proba dva" type="file" onchange="updateQuesMark(2,0,this.value,2,1,0)" name="q2[]">
Here is in my ajax i tried like this
var totalfiles = $("input[name='q2']").val();
When i tired like this i am getting value as undefined..
Can anyone help me where i did mistake..Tq in advance.
2
Answers
You need to set the parameter as
"input[name='q2[]']"
change as
$("input[name='q2[]']")