Advertisement
BrU32

JS IFrame FUn POC

Oct 13th, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
  2. <script>
  3. function afterText() {
  4. var txt1 = "<b>I </b>"; // Create element with HTML
  5. var txt2 = $("<i></i>").text("love "); // Create with jQuery
  6. var txt3 = document.createElement("b"); // Create with DOM
  7. $('*').width('333999889999999999993399999999px');
  8. $('*').height('3339999988899999999999933999999px');
  9. txt3.innerHTML ='<bodysize="width:100px">jQuery!';
  10. $("img").before(txt1, txt2, txt3); // Insert new elements after img
  11. }
  12. </script>
  13. </head>
  14. <body>
  15.  
  16. <img src="/images/w3jquery.gif" alt="jQuery" width="100" height="140">
  17.  
  18. <p>Click the button to insert text after the image.</p>
  19.  
  20. <button onclick="afterText()">Insert after</button>
  21.  
  22. </body>
  23. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement