add email address below to encode it to prevent spam harvesting



$(document).ready(function() { // executes when HTML-Document is loaded and DOM is ready $("#output").hide(); $( 'button' ).click(function() { var $input = $("#input").val(); console.log(input); var str = $input.replace(/\s/g, ''); var buf = []; for (var i=str.length-1;i>=0;i--) { buf.unshift(['&#', str[i].charCodeAt(), ';'].join('')); } var $output = buf.join(''); $("#output").val($output).show(); }); // document ready }); $(window).load(function() { // executes when complete page is fully loaded, including all frames, objects and images console.log("window is loaded"); // window load });