I have a function CheckMobile(MobNumber) and it will check all duplicate record of MobNumber which is passed in function. I want to use jquery to implement this.
<td><input type='text' name='Phone2' class='required' maxlength='10' /></td>
<td><a href="javascript:void(0)" onclick="CheckMobile(Phone2)">Check Phone</a></td>
and my jquery function is:
function CheckMobile(MobNumber) {
debugger;
var phone = $(MobNumber).val();
alert(phone);
}
But it does not work. In function i am getting undefined value.Please help how to get value of phone.
Phone2in the onclick? Is it a variable or did you mean it to be a selector for the input?