R
R
Rafael™2016-12-09 16:05:26
JavaScript
Rafael™, 2016-12-09 16:05:26

How to save the page cross-platform browsers?

when trying to save an html document that was modified programmatically (appendChild) - modifications were not saved in chrome, but
poppy / chrome35 / firefox48 were saved in firefox
how to save modified documents cross-platform on all desktops?

<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta charset="utf-8">

<style type="text/css" id="">

.b
  {
    width: 55px;
    height: 25px;
    color: black;
    background: silver;
  }

</style>

<script type="text/javascript"> 

window.onload = function()
  {
    a.onclick = function()
      {
        var слово = document.createElement('span')
        слово.className = 'b'
        слово.textContent = 'sdfsdfsd'
        document.body.appendChild(слово)
      }
  }

</script>

</head>
<body>

<span id="a" class="b">добавить</span>

</body></html>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Pugovkin, 2016-12-09
@Driver86

The first thing that came to my mind was to get the contents of the entire DOM with the same javascript, then send it to the server script with ajax, and it already forms some thread of the session link, which is issued for download as an html file and issues ajax in the response, and there is already a javascript makes a redirect....

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question