Sha256: 893ce6455cd4c9431be68c727ffeb4bd7baa6f9ab1d0ff627db49c7ae214ad80
Contents?: true
Size: 1.11 KB
Versions: 25
Compression:
Stored size: 1.11 KB
Contents
<!doctype html> <meta charset="utf-8" /> <title>fire_event onChange test case</title> <p> You should see the word “PASS” below. </p> <p id="result">FAIL</p> <hr /> <form id="elements" onSubmit="return false;"> <button>foo</button> <input type="checkbox" /> <input type="file" /> <input type="image" /> <a href="#">foo</a> <input type="radio" /> <select onChange="alert('changed!');"><option>foo</option></select> <select multiple><option>foo</option></select> <input type="text" /> <textarea></textarea> <p>foo</p> </form> <button onClick="this.innerHTML='clicked!';" onChange="alert('foo');">click</button> <script> var eventType = "change"; var elementList = document.getElementById("elements").elements; var successfulList = new Array(); for (i = 0; i < elementList.length; i++) { elementList[i].addEventListener(eventType, eventHandler, true); } function eventHandler (e) { successfulList.push(e); if (successfulList.length == elementList.length) document.getElementById("result").innerHTML = "PASS"; } </script>
Version data entries
25 entries across 25 versions & 1 rubygems