consumir rest jsp

Solutions on MaxInterview for consumir rest jsp by the best coders in the world

showing results for - "consumir rest jsp"
Lia
03 Feb 2019
1
2<html>
3    <head>
4        <title></title>
5        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
6        </script>
7
8        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
9    </head>
10    <body>
11        <h2>Calcular factorial</h2>
12        Número:<input type="text" name="base" id="base"/>
13        <button type="button" id="calcularBtn">Calcular</button>
14        <div id="resultado">
15            Resultado: <span></span>
16        </div>
17        <script type="text/javascript">
18            jQuery("#calcularBtn").click(function(){
19                var base = jQuery("#base").val();
20                jQuery.get("http://localhost:8080/SimpleRESTweb/resources/factorial",{
21                    base:base
22                },function(resultado){
23                    jQuery("#resultado span").text(resultado)
24                })
25            })
26        </script>
27    </body>
28</html>
29
30
queries leading to this page
consumir rest jspconsumir rest jsp