We Recommend

Pro JavaScript Techniques Pro JavaScript Techniques
Pro JavaScript Techniques is the ultimate JavaScript book for the modern web developer. It provides everything you need to know about modern JavaScript, and shows what JavaScript can do for your web sites. This book doesn't waste any time looking at things you already know, like basic syntax and structures.


Posted By

nicolaspar on 03/13/07


Tagged

regex String parser TEXTO href sacar


Versions (?)


Who likes this?

1 person has 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.