Ver Mensaje Individual
  #10 (permalink)  
Antiguo 09/04/2011, 13:52
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 16 años, 8 meses
Puntos: 1012
Respuesta: replace para remplazar codigo de html

por qué dices que no funciona replace como tú quieres??
Cita:
function fnc() {
var str = document.body.innerHTML;
str = str.replace(/http:\/\/imgserver(.+)\.jpg/g, '<img src="http:\/\/imgserver$1\.jpg" \/>');
document.body.innerHTML = str;
}

window.onload = function() {fnc();};