Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I send Current web page's whole HTML document to server?

how can I send my currently seeing web page(means javascript processed manipulated html documnet for user's view - kind of interactive AJAX web pages) to server?

Can I send 'the documnet object mother of all html elements' to server as it is?

like image 935
KOLOKOLOK Avatar asked Nov 01 '13 08:11

KOLOKOLOK


People also ask

How do I share my HTML website?

Create a new folder in Drive and share it as “Public on the web.” Upload your HTML, JS & CSS files to this folder. Open the HTML file & you will see “Preview” button in the toolbar. Share the URL that looks like www.googledrive.com/host/… from the preview window and anyone can view your web page.

How do you link multiple pages in HTML?

Step 1: To link two pages in HTML, you might want to start by opening your template text file and navigate to file>save as. This will open up a dialogue box. Now, navigate to your HTML folder. Step 2: Save the new web page you've created in your desired folder.


1 Answers

Just use standard js function for getting 'body' element and it's innerHTML

  var bodyHtml = document.getElementsByTagName('body')[0].innerHTML;

then you can use ajax request to a server for sending html

like image 173
BotanMan Avatar answered Jan 03 '23 16:01

BotanMan