JSFiddle - React, Tailwind, and code Playground
by ghazal
HTML
<div id='target'><p>Texte à remplacer dans 3 s</p></div>
JavaScript
var requete = new Request.HTML({
// L'URL qui envoie l'info
url: "/echo/html/",
update: 'target',
data: {
html: "<p>Le texte envoyé par la requête</p>" + "<script type='text/javascript'>$('target').highlight();<\/script>",
delay: 3
},
// on success
onSuccess: function(content) {
// on sort
console.log("Le contenu est: ", content);
}
}).send(); // envoi du contenu
//OUVRIR LA CONSOLE