12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <html>
- <head>
- <title>The jQuery Example</title>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
- </head>
- <body>
- <h1>
- <div id="title">
- NAP ID
- </div>
- </h1>
- <div id="stage">
- </div>
- <script type="text/javascript" language="javascript">
- $(document).ready(function () {
- var url = "http://200.50.160.234:8088/api/v1/nap?id=1";
- console.log(url);
- $.ajax({
- url: url,
- type: "GET",
- crossDomain: true,
- data: "id=1",
- dataType: "json",
- success: function (response) {
- $('#stage').html(response);
- console.log(response);
- console.log("fin success");
- },
- error: function (xhr, status) {
- $('#stage').html(status);
- console.log(status);
- console.log(xhr);
- console.log("fin error");
- }
- }
- );
- // $.get(
- // url,
- // crossDomain: true,
- // function (data) {
- // $('#stage').html(data);
- // }
- // );
- });
- </script>
- </body>
- </html>
|