As I'm a noobs on javascript, I need some help to figure out how to grab spesific part of html code using pure javascript.
I wanted to get this part :
6LfLgwgTAAAAAFgpAIOgNmfzKi5Ko2ZnNeIE2uLR
From HTML code below :
<div id="document-container">
<div style="width: 304px; height: 78px;">
<div>
<iframe src="https://www.example.com/document/api2/anchor?k=6LfLgwgTAAAAAFgpAIOgNmfzKi5Ko2ZnNeIE2uLR&co=aHR0cHM6Ly93d3cuZ29vZ2xlLmNvbTo0NDM.&hl=en&v=r20170816175713&size=normal&cb=xksmil4x110" title="document widget" scrolling="no" sandbox="allow-forms allow-same-origin allow-scripts allow-top-navigation allow-modals allow-popups allow-popups-to-escape-sandbox" width="304" height="78" frameborder="0">
</iframe>
</div>
<textarea id="g-document-response" name="g-document-response" class="g-document-response" style="width: 250px; height: 40px; border: 1px solid #c1c1c1; margin: 10px 25px; padding: 0px; resize: none; display: none; ">
</textarea>
</div>
</div>
I do believe it can be done using document.getElementById or regex. I think i can do it using PHP, but i have no idea how to do it in javascript.