How to get textbox value from their textchanged event using jquery/javascript. I tried many things but didnt work. The last is I try, Here is the following code
@for (int i = 0; i < Model.MaterialRecordRowCount; i++)
{
<div class="form-group row">
<div class="col-sm-3">
<input type="text" id="Material_PartNo@(i)" name="Material_PartNo@(i)" data-provide="typeahead" class="typeahead search-query form-control autocomplete" placeholder="PartNo" onclick="ShowData ('$('#Material_PartNo@(i)').val()')" />
</div>
</div>
}
function ShowData(PartNo) {
alert(PartNo);
}
Now when I run this code it shows an error i.e. Uncaught SyntaxError: Invalid or unexpected token
I am not getting the right syntax even dont know that this method is right for getting the textbox value by their textchanged event or not.
onclick="ShowData(this.value)"