Client side of AJAX string reverse
snippets/3/client/v2.html
<form> <input name="str" id="str"> <input type="submit" id="reverse" value="Reverse"> </form> <script> $("#reverse").click(function() { var str = $("#str").val(); jQuery.get('http://127.0.0.1:5000/api/v2/reverse?str=' + encodeURIComponent(str) , function(data) { console.log(data); $("#msg").html(data["text"]); }); return false; }); </script>
Try: v2