Posted By

nicolaspar on 03/13/07


Tagged

regex String parser TEXTO href sacar


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vali29


Javascript - Eliminar tags A en pagina de impresión


 / Published in: JavaScript
 

  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  

You need to login to post a comment.