Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <label for="team"><center>Scegli un materiale:</center></label>
- <select id="team" name="team">
- <option value="">Effettua una selezione</option>
- <option value="ABS">ABS (302)</option>
- <option value="PBT">PBT (PTMT) (322)</option>
- <option value="PPS">PPS (319)</option>
- </select>
- </div>
- </div>
- </div>
- <div id="tabella"></div>
- <script src="https://code.jquery.com/jquery-3.4.1.js"></script>
- <script>
- $(document).on("change", "#team", function() {
- var team = $(this).val();
- if (team !== '') {
- $.ajax({
- type: "post",
- url: 'tabelle.php',
- data: 'team='+JSON.stringify(team),
- dataType: 'html',
- success: function(response) {
- $('#tabella').html(response);
- },
- error: function(response) {
- $('#tabella').html('<br />ERRORE : il server non risponde o lo ha fatto in modo anomalo '+response.responseText);
- }
- });
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement