fork download
  1. var tel = document.querySelector('.l-page__left').innerHTML;
  2. var a = document.createElement('a');
  3. a.href = 'data:text/html;charset=utf-8,' + tel;
  4. a.download = 'file1.html';
  5. a.style.width = '220px';
  6. a.style.height = '220px';
  7. a.style.background = 'red';
  8. a.innerHTML = 'Нажми меня!';
  9.  
  10. console.log(tel);
  11.  
  12. var child = document.querySelector('.b-breadcrumbs');
  13. var parent = child.parentNode;
  14.  
  15. parent.insertBefore(a, child);
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
var tel = document.querySelector('.l-page__left').innerHTML;
var a = document.createElement('a');
a.href = 'data:text/html;charset=utf-8,' + tel;
a.download = 'file1.html';
a.style.width = '220px';
a.style.height = '220px';
a.style.background = 'red';
a.innerHTML = 'Нажми меня!';

console.log(tel);

var child = document.querySelector('.b-breadcrumbs');
var parent = child.parentNode;

parent.insertBefore(a, child);