Base: Add test page for <input type=button> elements
Particularly to test label associations.
This commit is contained in:
parent
e074fc70e1
commit
d40f3aa0d0
Notes:
sideshowbarker
2024-07-18 20:48:30 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/d40f3aa0d00 Pull-request: https://github.com/SerenityOS/serenity/pull/6115
2 changed files with 22 additions and 0 deletions
Base/res/html/misc
21
Base/res/html/misc/button.html
Normal file
21
Base/res/html/misc/button.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<body>
|
||||
<br />
|
||||
<input type=button id=button1 name=hp value="Option 1">
|
||||
<label for=button1>Press Me!</label>
|
||||
<br />
|
||||
<input type=button id=button2 name=hp value="Option 2">
|
||||
<label for=button2>No, Press Me!</label>
|
||||
<br />
|
||||
<div style="display: inline-block;">
|
||||
<pre>Last pressed: <span id=last></span></pre>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById('button1').addEventListener('click', function() {
|
||||
document.getElementById('last').innerHTML = this.value;
|
||||
});
|
||||
document.getElementById('button2').addEventListener('click', function() {
|
||||
document.getElementById('last').innerHTML = this.value;
|
||||
});
|
||||
</script>
|
||||
</body>
|
|
@ -46,6 +46,7 @@ span#loadtime {
|
|||
<li><a href="float-3.html">floating boxes with overflow=hidden</a></li>
|
||||
<li><a href="padding-inline.html">inline elements with padding</a></li>
|
||||
<li><a href="event-bubbling-and-multiple-listeners.html">event bubbling and multiple listeners</a></li>
|
||||
<li><a href="button.html">button</a></li>
|
||||
<li><a href="radio.html">radio button</a></li>
|
||||
<li><a href="checkbox.html">checkbox</a></li>
|
||||
<li><a href="canvas-rotate.html">canvas rotate()</a></li>
|
||||
|
|
Loading…
Add table
Reference in a new issue