1 Hi,
See below code:
$( document ).ready(function() {
$( "#target" ).click(function() {
var Result = "1,2,3,4,5,6,7,8,9,0";
if(Result.indexOf($(this).val()) > 0)
{
alert("found");
}
});
});
Note: If $(this).val() didn't work then use id directly $("#target").val()
Accepted 1
Hello ,
use below code-
<script type="text/javascript" language="javascript">
$(document).ready(function () {
$("#btnClick").click(function () {
alert('in');
var Result = "1,2,3,4,5,6,7,8,9,0";
if (Result.indexOf($("#btnClick").val()) > 0) {
alert("found");
}
});
});
</script>
<asp:Button ID="btnClick" runat="server" ClientIDMode="Static" OnClick="btnClick_Click" Text="Add" />
0 according to your need this link work properly.
0 Thanks
Manas Mohapatra And Upendra Pratap Shahi
Both answer working fine .
Thanks lot saved my time :) .