This commit is contained in:
louiscklaw
2025-01-31 19:15:17 +08:00
parent 09adae8c8e
commit 6c60a73f30
1546 changed files with 286918 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Lab8 Task 3b</title>
<link rel="stylesheet" type="text/css" href="css/Lab08_Q3_layout.css">
<script src="jquery/jquery-2.1.4.js"></script>
<script>
$(document).ready(function(){
$.ajax({
type: 'POST',
url: 'Lab08_3a.php',
dataType: 'json',
success: function(result){
$.each(result.part, function(key, value){
$('tbody').append($('<tr>')).append($('<td>').text(value.item)).append($('<td>').text(value.manufacturer)).append($('<td>').text(value.model)).append($('<td>').text(value.cost));
});
},
error: function(err){
console.log("error" + err);
}
});
});
</script>
</head>
<body>
<h2>Table of Computer Parts</h2>
<table id="tableID" border="1">
<thead>
<tr>
<th>Item</th>
<th>Manufacturer</th>
<th>Model</th>
<th>Cost in $</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</body>
</html>