I want to obtain the entire text content of a web page, when the page is open within main window of browser. Is there some way to do this- preferably using jquery, but pure js is also ok for me. I want to obtain both the normal text as well as link texts also- only images should be excluded
Do you mean
$(document).ready(function(){
var bodyText = $("body").text();
});
I hope this code help you
$(function(){
var t = $('body > *').not('img').text()
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.