JSFiddle - React, Tailwind, and code Playground

by Serge Zahharenko

HTML

<img src="http://0.0.0.0/">

JavaScript

function updatePics() {
    $('img').each(function(){
        src = $(this).attr('src');
        src = src.replace('0.0.0.0','localhost');
        $(this).attr('src', src);
        alert(src);
    })
}
$(document).ready(function(){
    $(document).keydown(function(e) {
        var code = (e.keyCode ? e.keyCode : e.which);
        if(code == 73) updatePics();
    });
});