
ONCHANGE attribute for INPUT elements
On this page:
Test
1 |
References
|
About these tests
Nearby:
More HTML 4.01 Tests
|
UAAG 1.0 Test Suite
UAAG 1.0 Requirement
-
Checkpoint
1.2
Activate event handlers
(Priority
1
)
-
Provision
1
:
Allow the user to activate, through keyboard input alone, all input device event handlers that are explicitly associated with the element designated by the content focus.
Procedure
- Using the keyboard or an assistive technology that emulates the keyboard, move focus to the input control and alter the input control's value.
- Using the keyboard or an assistive technology that emulates the keyboard, move focus off the input control to trigger the onChange event.
Run test
Expected results
- When the onChange event is triggered, the "Echoed Value" input box displays the same value as the "Original Value" input box.
Source code
<form action="../action/return.html" method="post" id="origForm" enctype="application/x-www-form-urlencoded">
<label for="orig">Original Value: </label>
<input id="orig" onchange="changeTest(this.form)" name="orig" type="text"></input>
<br clear="none"></br>
<label for="echo">Echoed Value: </label>
<input id="echo" type="text"></input>
</form>
Test Script Code
function changeTest ( form )
{
form.echo.value = form.orig.value
}
-
HTML 4.01 specification for ONCHANGE
-
HTML 4.01 specification for INPUT
This test is part of a
test suite
for the
User Agent Accessibility Guidelines (UAAG)
1.0
. This work is conducted by the
User Agent Accessibility Guidelines Working
Group
, which is part of W3C's
Web Accessibility Initiative (WAI)
. Please send comments on this test to w3c-wai-ua@w3.org (
public archive
).
Test created by:
- Dominique Kilman
- Colin Koteles
Last modified: $Date: 2003/04/02 23:46:28 $ by $Author: jongund $
Copyright
© 1999 - 2003
W3C®
(
MIT
,
INRIA
,
Keio
), All Rights Reserved. W3C
liability
,
trademark
,
document use
and
software licensing
rules apply.