about summary refs log tree commit diff
path: root/usth/ICT3.2/prac/3/3-vanilla.html
diff options
context:
space:
mode:
Diffstat (limited to 'usth/ICT3.2/prac/3/3-vanilla.html')
-rw-r--r--usth/ICT3.2/prac/3/3-vanilla.html14
1 files changed, 14 insertions, 0 deletions
diff --git a/usth/ICT3.2/prac/3/3-vanilla.html b/usth/ICT3.2/prac/3/3-vanilla.html
new file mode 100644
index 0000000..0cee920
--- /dev/null
+++ b/usth/ICT3.2/prac/3/3-vanilla.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<body>
+  <form>
+    <input id='field1' type='text' value='Field 1'>
+    <input id='field2' type='text' value='Field 2'>
+  </form>
+  <script>
+    document.getElementById('field1').addEventListener(
+      'blur', event => document.getElementsByTagName('body')[0]
+                               .setAttribute('style', 'background-color: #436e58'))
+  </script>
+</body>
+</html>