CodePen

HTML

            
              p 'input' event test
form
  div
    input.inp[data-ref='i']
  div
    textarea.inp[data-ref='t']
  div
    input[type="reset"]
    button[type="button"] random
div
  div
    'input content:
    span#i
  div
    'textarea content:
    span#t
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              span{
  background:#b6f087;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              $(function(){
  console.clear();
  var inp = $('.inp');
  var btn = $('button');
  inp.on('input',function(){
   var ref = $(this).data('ref');
    $("#"+ref).text(this.value);
  });
    btn.click(function(){
      inp.each(function(){
        this.value = Math.random();
      }); 
    });
});
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................