show message with div content - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:text

Description

show message with div content

Demo Code

ResultView the demo in separate window

<!doctype html>
<html lang="en">
   <head> 
      <title>Example</title> 
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> 
   </head> 
   <body> 
      <div>
         Im the content//from  w w w  . j av a 2s .com
      </div> 
      <script>
        console.log( $('div').text() ); // show message with div content
    
      </script>  
   </body>
</html>

Related Tutorials