Monday 15 April 2013

How to replace letters with alt codes using JavaScript -


OK, so I want to create an HTML page with javascript. I want that whatever I put in the input bar, different translations are done, for example if I put a in the box then I would call it â <º I will. And if I type a word like halo then I'll call it a a "???" Line Line Line Line Line Line ¼ . Does anyone know how to do this?

Here is an example in jQuery:

The type of letter you want With that, you have to fill the replacement head. var replacement = {"A": ")", "b": "& gt;", "(" input ") {$ (" # translator "). Val (function (I, val) {val = val.split ('';; $ .eich (val, function (i, e) {val} = replacement [e] replacement [e]: e;}); return valve .Join ('');})}});

Source:

No comments:

Post a Comment