about summary refs log tree commit diff
path: root/usth/ICT3.2/prac/2/10.html
diff options
context:
space:
mode:
Diffstat (limited to 'usth/ICT3.2/prac/2/10.html')
-rw-r--r--usth/ICT3.2/prac/2/10.html49
1 files changed, 49 insertions, 0 deletions
diff --git a/usth/ICT3.2/prac/2/10.html b/usth/ICT3.2/prac/2/10.html
new file mode 100644
index 0000000..d092b48
--- /dev/null
+++ b/usth/ICT3.2/prac/2/10.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<style>
+h1 { text-align: center }
+form {
+    display: table;
+    margin: 0 auto;
+}
+p { display: table-row }
+.cell {
+    display: table-cell;
+    margin: 0.2em 0;
+}
+</style>
+
+<script>
+function check() {
+    const PW = document.getElementById('pw').value;
+    const PW2 = document.getElementById('pw2').value;
+    if (PW != PW2)
+        alert('Your password and confirmation password do not match!');
+}
+</script>
+
+<html>
+<body>
+  <h1>Sign Up</h1>
+  <form>
+    <p>
+      <label class=cell for=user>Username:&emsp;</label>
+      <input class=cell type=text id=user>
+    </p>
+    <p>
+      <label class=cell for=pw>Password:&emsp;</label>
+      <input class=cell type=password id=pw>
+    </p>
+    <p>
+      <label class=cell for=pw2>Re-type Password:&emsp;</label>
+      <input class=cell type=password id=pw2>
+    </p>
+    <p>
+      <span class=cell></span>
+      <span class=cell>
+        <input type=reset>
+        <input type=button onclick='check()' value=Submit>
+      </span>
+    </p>
+  </form>
+</body>
+</html>