Jquery implements input what div layer does it show

  • 2020-03-30 03:21:10
  • OfStack

 
<html> 
<meta charset="utf-8" /> 
<style > 
.ppp{ 
width:600px; 
height:300px; 
background-color:pink; 
} 
</style> 
<input type="text" id="ttt" name="" value="" maxlength="" placeholder="" /> <br /><br /><br /> 

<div class="ppp"></div><!-- --> 

<script src="jquery-1.7.2.min.js"></script> 
<script> 
$("document").ready(function(){ 
$("#ttt").keyup( 
function(){$(".ppp:first").html(this.value)} 
) 
}); 
</script> 
</html> 

Related articles: