input框绑定事件

发表于

<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>

<input class="aa" value="" type="text" />
<span class="bb"></span>


<script>
$('.aa').bind('input propertychange', function() {
 searchProductClassbyName();
});
function searchProductClassbyName() {
  $('.bb').html($('.aa').val());
}
</script>

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注