jQuery loads the data instance from the server file using the $.get of method

  • 2020-05-19 04:07:32
  • OfStack

This example shows how jQuery loads data from a server file using the $.get () method. Share with you for your reference. The details are as follows:


<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js">
</script>
<script>
$(document).ready(function(){
 $("button").click(function(){
  $.get("demo_test.asp",function(data,status){
   alert("Data: " + data + "\nStatus: " + status);
  });
 });
});
</script>
</head>
<body>
<button> send HTTP GET Request and get the return value </button>
</body>
</html>

I hope this article has been helpful to your jQuery programming.


Related articles: