daily pastebin goal
83%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <iframe id='myFrame' />
  2.  
  3.  var src = 'data:text/html;charset=utf-8,' + encodeURIComponent(
  4.           "<!doctype html><html><head></head><body><h1>Title</h1></body></html>");
  5.  
  6.  $('#myFrame').attr('src', src);
  7.    
  8. $('#myFrame').contents().find('html').html('new template');
  9.    
  10. var source =  "<!doctype html><html><head></head><body><h1>Title</h1></body></html>";
  11.  
  12.  $('#myFrame').contents().find('html').html(source);
  13.  $('#myFrame').contents().find('html').html('<body>Hi2</body>');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top