javascript or jquery code to obtain entire text content of web page within an iframe (including/excluding links on that page) -


i know how obtain content of div within iframe using jquery--

iframe content:

    <div id="mycontent"></div> 

jquery:

 $("#myiframe").find("#mycontent") 

what want is, obtain entire text content of iframe, both text of links within iframe, text content excluding link texts within iframe.

i want ideally using jquery, pure js or jquery+ js fine me.

you can use .contents()

<iframe src="your_url.com" id='myiframe'></iframe> 

to whole content iframe

$("#framedemo").contents() 

to data specific element.

$("#myiframe").contents().find("#mycontent") 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -