diff options
author | Adam Hodgen <ant1441@gmail.com> | 2022-02-17 23:24:30 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-18 01:48:51 +0100 |
commit | b9b24cb1c1c73fbcbdc9bec6b9b2bf8e47efa4a6 (patch) | |
tree | 0329c82d7dfffe3f415d5436785449c3ee9f783d | |
parent | aa70422b4d076b07d2f0b0587ddd7d9ca692b24a (diff) | |
download | serenity-b9b24cb1c1c73fbcbdc9bec6b9b2bf8e47efa4a6.zip |
Base: Add <input> test page
-rw-r--r-- | Base/res/html/misc/input.html | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/Base/res/html/misc/input.html b/Base/res/html/misc/input.html new file mode 100644 index 0000000000..b679713398 --- /dev/null +++ b/Base/res/html/misc/input.html @@ -0,0 +1,71 @@ +<p> + <input type="hidden" id="hidden" value="hidden" /><br /> + <input type="text" id="text" value="text" /><br /> + <input type="search" id="search" value="search" /><br /> + <input type="tel" id="tel" value="tel" /><br /> + <input type="url" id="url" value="url" /><br /> + <input type="email" id="email" value="email" /><br /> + <input type="password" id="password" value="password" /><br /> + <input type="date" id="date" value="date" /><br /> + <input type="month" id="month" value="month" /><br /> + <input type="week" id="week" value="week" /><br /> + <input type="time" id="time" value="time" /><br /> + <input type="datetime-local" id="datetime-local" value="datetime-local" /><br /> + <input type="number" id="number" value="number" /><br /> + <input type="range" id="range" value="range" /><br /> + <input type="color" id="color" value="color" /><br /> + <input type="checkbox" id="checkbox" value="checkbox" /><br /> + <input type="radio" id="radio" value="radio" /><br /> + <input type="file" id="file" value="file" /><br /> + <input type="submit" id="submit" value="submit" /><br /> + <input type="image" id="image" value="image" /><br /> + <input type="reset" id="reset" value="reset" /><br /> + <input type="button" id="button" value="button" /><br /> + + <input type="invalid" id="invalid" value="invalid" /><br /> +</p> + +<script> + var ids = [ + "hidden", + "text", + "search", + "tel", + "url", + "email", + "password", + "date", + "month", + "week", + "time", + "datetime-local", + "number", + "range", + "color", + "checkbox", + "radio", + "file", + "submit", + "image", + "reset", + "button", + "invalid", + ]; + document.addEventListener("DOMContentLoaded", function() { + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + var e = document.getElementById(id); + console.log("id=", id, "type=", e.type); + } + + var e = document.getElementById("invalid"); + e.type = "invalid2" + console.log("after change type=", e.type); + + e.type = "number" + console.log("after change 2 type=", e.type); + e.value = "123abc456" + console.log("after value change value=", e.value); + + }); +</script> |