Get value of div content using jquery

Total Post:52

Points:366
 312  View(s)
Ratings:
Rate this:

I want to get the value of div this is my html code

 how can i do this using jquery

 <div class="form-control" id="user">

        product
 </div>

thanks in advance..


  1. Post:45

    Points:323
    Re: Get value of div content using jquery

    Use .text() to extract the content of the div

    var text = $('#user').text()

    hope it helps you..

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!