简体   繁体   中英

Unable to get the html body from a website using javascript from the browser console

As far as I know, I've only had this issue come from wolframalpha.com eghttps://www.wolframalpha.com/input/?i=Factor%5Bx%5E2++-+++16%5D

My goal is to get html using javascript. So opening the developer tools I wrote

document.body.innerHTML;

But get Uh oh; Wolfram|Alpha doesn&#x27.t run without JavaScript;</span></span><div class=\"HHXp5 _2CYJA\"><span&gt.Please enable JavaScript. Uh oh; Wolfram|Alpha doesn&#x27.t run without JavaScript;</span></span><div class=\"HHXp5 _2CYJA\"><span&gt.Please enable JavaScript. , as PART of the response and not the full contents of the webpage.

I didn't want to make assumptions about how the website is operating, so I am going off with the information I got back and framed my question this way. Javascript is clearly enabled and I am guessing some js functionality is redirected prior to the page loading.

I've tried this with the latest chrome incognito and safari.

Taking the suggestions from the comments, the issue was resolved after reenabling javascript on my site settings.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM