Home  >  Q&A  >  body text

don't know

<input type="text" name="" id="name">


##<script type="text/javascript">

$(function(){

$('#name').change(function(){

console.log($(this))

$('this').css('backgroundColor','red');

})

})

</script>


Why this doesn’t work> $(this) gets the input when printed out on the console

红色熊猫红色熊猫2095 days ago1070

reply all(2)I'll reply

  • lh

    lh2019-02-19 18:01:11

    More single quotes

    reply
    0
  • Cancelreply