Javascript - Eliminar tags A en pagina de impresión


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <html>
  2. <head>
  3. <title>MySite</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <script>
  6. function volcarContenido(){
  7. contenido = opener.document.getElementById('impresion').innerHTML;
  8. contenido = contenido.replace(/<a([^>]+)>|<\/a>/gi,"")
  9. document.write(contenido);
  10. }
  11. </script>
  12. </head>
  13. <body >
  14. <script>volcarContenido()</script>
  15. </body>
  16. </html>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.