How can I restrict the number of characters entered into an HTML Input with CSS (or jQuery, if necessary)?
问题 I can manipulate a control based on the state of another control, as shown in this jsfiddle, where the state of a Checkbox alters the width and background color of a Textbox. The HTML is: <input type="checkbox" id="ckbxEmp" >czech Bachs <input type="text" id="txtbxSSNOrITIN"> The jQuery is: $(document).on("change", '[id$=ckbxEmp]', function () { if ($(this).is(":checked")) { $('[id$=txtbxSSNOrITIN]').css('background-color', '#ffff00'); $('[id$=txtbxSSNOrITIN]').css('width', '24'); } else { $(