---
title: "Print a number table request by the user in ajax."  
description: "Print a number table request by the user in ajax."  
author: "Ethan Karla"  
published: 2021-08-19  
canonical: https://answers.mindstick.com/qa/93910/print-a-number-table-request-by-the-user-in-ajax  
category: "programming"  
tags: ["java", "jsp and servlets", "php programming", "javascript", "asp.net mvc"]  
reading_time: 1 minute  

---

# Print a number table request by the user in ajax.

[Print](https://www.mindstick.com/blog/301752/types-of-3d-printing-technology) a number [table](https://www.mindstick.com/articles/43918/how-to-design-table-using-bootstrap) [request](https://www.mindstick.com/blog/255/post-get-and-request-function-in-php) by the [user](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) in ajax.

## Answers

### Answer by Steilla Mitchel

```html
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<title>Example of Sending Data with Ajax GET Request in jQuery</title>
<script src='https://code.jquery.com/jquery-3.5.1.min.js'></script>
<script>
$(document).ready(function(){
   $('button').click(function(){
       // Get value from input element on the page
       var numValue = $('#num').val();

       // Send the input data to the server using get
       $.get('/examples/php/create-table.php', {number: numValue} , function(data){
           // Display the returned data in browser
           $('#result').html(data);
       });
   });
});
</script>
</head>
<body>
   <label>Enter a Number: <input type='text' id='num'></label>
   <button type='button'>Show Multiplication Table</button>
   <div id='result'></div>
</body>
</html>
```


---

Original Source: https://answers.mindstick.com/qa/93910/print-a-number-table-request-by-the-user-in-ajax

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
