The code is not working want to know how to rectify it
<script src="Script/jquery-1.11.3.min.js"></script><script>
$(document).ready(function () {
debugger;
$("#btn1").click(function () {
$v = $("#txt").val();
for (i = 0; i < $v; i++) {
var box = $('<input type="checkbox" class="chkbx" name="chkbx" value="Option' + i + '">Option ' + i + '<br/>');
$("#display").append(box);
}
});
$(document).on("change", ".chkbx", function () {
debugger;
$("#show").val("");
var selected = [];
$(".chkbx:checked").each(function () {
selected.push($(this).val());
});
$("#show").val(selected.join(", "));
});
});
</script>
</head>
<body>
<table>
<tr>
<td><input type="text" id="txt" name="text" /></td>
<td><button id="btn1">Create</button></td>
</tr>
<tr>
<td><div id="display"></div></td>
</tr>
<tr>
<td><input type="text" id="show" name="show" placeholder="Display Selection.."/></td>
<td><p></p></td>
</tr>
</table>
</body>
</html>