# Js: get the contents of a \<div\>

**URL:** <https://forum.kirupa.com/t/js-get-the-contents-of-a-div/68306>\
**Category:** Uncategorized\
**Created:** [October 24, 2004, 4:02pm UTC](https://forum.kirupa.com/t/js-get-the-contents-of-a-div/68306 "2004-10-24T16:02:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andr\_in](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/andr_in/32/37_2.png) [@andr\_in](https://forum.kirupa.com/u/andr_in)\
**Post date:** [October 24, 2004, 4:02pm UTC](https://forum.kirupa.com/t/js-get-the-contents-of-a-div/68306/1 "2004-10-24T16:02:56Z")

</div>

I need to retreive the text inside a \<div\>…  
I know I can do mydiv.innerHTML but is there something that retreives the text without including the html?

er… or mby there’s something like striptags() in php that removes the html…  
:whistle:
