You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.6 KiB

<!DOCTYPE html>
<head>
<script src="script.js"></script>
</head>
<body>
<button onclick="addStudent()">add student</button>
<br>
<div>
<label>enter student name</label>
<input type="text" id="findName"/>
<button id="editStudent">edit</button>
<button id="deleteStudent" onclick="deleteData()">delete</button>
</div>
<div id="editForm">
<p>student to edit</p>
<p>edit the data to update</p>
<span>name:
<span id="editName"></span>
</span>
<br>
<label>weight</label>
<input type="text" id="editWeight">
<label>height</label>
<input type="text" id="editHeight">
<label>hair colour</label>
<input type="text" id="editHairColour">
<label>gpa</label>
<input type="text" id="editGpa">
<button onclick="updateData()">apply changes</button>
</div>
<br>
<form id="add">
<label>name</label>
<input type="text" id="addName"/>
<label>weight</label>
<input type="text" id="addWeight"/>
<label>height</label>
<input type="text" id="addHeight"/>
<label>hair colour</label>
<input type="text" id="addHairColour"/>
<label>gpa</label>
<input type="text" id="addGpa"/>
<button id="submitStudent" onclick="addData()">submit</button>
</form>
<br>
<h1>students</h1>
<table id="studentInfo">
<tr>
<th>name</th>
<th>weight</th>
<th>height</th>
<th>hair colour</th>
<th>gpa</th>
</tr>
<tr>
<td id="sName"></td>
<td id="sWeight"></td>
<td id="sHeight"></td>
<td id="sHairColour"></td>
<td id="sGpa"></td>
</tr>
</table>
</body>
</html>