如何在链接粘贴到最后一个单词后制作图标:
$(function () {
$('input[name=resident]').click(function () {
if (this.id == "residentNo") {
$(".d").hide('slow');
} else {
$(".d").show('slow');
}
$('.d').find('#precinctNum, #yearStartedLiving').val('');
});
$('input[name=resident][value="No"]').trigger('click');
});
<script src="http://code.jquery.com/jquery-1.11.3.js"></script>
<label class="radio-inline"><input type="radio" class = "res" id = "residentYes" name="resident" value="Yes" checked> Yes</label>
<label class="radio-inline"><input type="radio" class = "res" id = "residentNo" name="resident" value="No" > No</label>
<div class="d item form-group" >
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Precinct Number <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input id="precinctNum" class="form-control col-md-5 col-xs-12" name="precinctNum" data-validate-length-range="7" required="required" type="number">
</div>
</div>
<div class="d item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Start of Residency (Year) <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type="text" id="yearStartedLiving" name="yearStartedLiving" class="form-control col-md-5 col-xs-12" required="required" data-inputmask="'mask': '9999'">
</div>
</div>