Javascript examples for jQuery:Form Input
Dynamic input replace in JQuery
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-git.js"></script> <script type="text/javascript"> $(window).on('load', function() { $(function(){//from ww w .j a v a2 s . com $("input").keyup(function(){ var $this = $(this); if ($this.val().indexOf("=")>=0){ $this.val(eval($this.val().replace("=", "").replace("x","*"))); } }); }); }); </script> </head> <body> <input type="text"> </body> </html>