4.3.11

Charset en Jquery

¿Cómo setear el set de caracteres al cargar contenido utilizando AJAX y JQuery?



Código:
$.ajaxSetup({
                     'beforeSend' : function(xhr) {
                         xhr.overrideMimeType('text/html; charset=iso-8859-1');
                      },
                  });
$.ajax({
            type: "GET",
            url : "funciones/listado_prensa.php",
            success:function(msg){
                                            if(msg){
                                                $("#listado").html(msg);
                                                $('.nyroModal').nyroModal();
                                            }
                                      }
            });
 Fuentes: stackoverflow.com, api.jquery.com

No hay comentarios. :

Publicar un comentario

Sentite libre de comentar, criticar y/o aportar tu granito en este (proyecto de..) mar de conocimiento ;)