Linked Questions

7 votes
2 answers
6k views

I know there's a way to do this, but I cannot recall how. How do I go about grabbing the HTML element (top-most element in the DOM), using plain JavaScript?
Zoolander's user avatar
  • 2,373
0 votes
2 answers
313 views

I'm trying to allow for a save feature on my webpage. I'm using the 'SaveFile.js' module found here: 'https://github.com/eligrey/FileSaver.js/' When a user clicks the save button, the document should ...
jamie's user avatar
  • 176
0 votes
1 answer
76 views

var xmlhttp = null; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp....
Abdulkarim Eskandar's user avatar
0 votes
0 answers
67 views

Possible Duplicate: Get entire document HTML as string I want to find all instances of a regex pattern within a webpage. I want to do something like this: myWindow=window.open('http://en....
Qwertyfshag's user avatar
  • 1,039
0 votes
0 answers
56 views

I would like to take a complete snapshot of website using JavaScript, like the one a browser take when saving the page as HTML (picture below). By using a simple script like document.documentElement....
nakaakist's user avatar
  • 358
40 votes
5 answers
27k views

I know that I can access to doctype object via document.doctype or document.childNodes[0] but my problem is getting doctype as a string. I can do this in chrome and safari by calling document.doctype ...
matte's user avatar
  • 1,246
39 votes
5 answers
89k views

Is there a way to access the page HTML source code using javascript? I know that I can use document.body.innerHTML but it contains only the code inside the body. I want to get all the page source ...
mck89's user avatar
  • 19.3k
10 votes
6 answers
21k views

I am aware of the hidden iFrame trick as mentioned here (http://stackoverflow.com/questions/365777/starting-file-download-with-javascript) and in other answers. I am interested in a similar problem: ...
xan's user avatar
  • 7,568
9 votes
4 answers
20k views

I have HTML and I need to get page source of this html. document.documentElement.outerHTML or $.ajax({ async: true, type: 'GET', cache: false, url: window.location.href, success: function(data) { ...
indapublic's user avatar
  • 2,348
4 votes
2 answers
8k views

I have document (component tree) 'm' which i am trying to store in the local storage of html5. I tried setting it to local storage. but when i retrieve it back, this m has changed to [object Document]....
mehere's user avatar
  • 1,538
0 votes
3 answers
8k views

I am trying to send an email of my html page. This is the code I have so far: <script language="javascript"> function emailCurrentPage() { window.location.href = "mailto:?subject=" +...
Anthony's user avatar
  • 1,581
4 votes
2 answers
3k views

I have an HTML page that has Javascript code. It needs to be rendered first before it can be converted into an image. I am aware of projects like wkhtmltoimage, PhantomJS, khtmltopng, webkit2png, ...
KrispyDonuts's user avatar
  • 1,282
1 vote
4 answers
3k views

I'm looking for a way to read the source code of a page after it finished loading and inspect the code to see if it contains a specific text. I found this reference but this only returns the text ...
Leo S.'s user avatar
  • 29
1 vote
2 answers
2k views

I have a JSON report that I append to my webpage that monitors a server's processes and every processes that is running it returns the string "runn1ng". I want to do a summary at the top of the ...
Lasagna Cat's user avatar
1 vote
1 answer
2k views

I have something like this public render(){ let htmlRender = "<html><body><h2>Children</h2>Joe has three kids:<br/><ul><li>Linn Fenimore Cooper Cary (...
suprita shankar's user avatar

15 30 50 per page