mirror of
https://github.com/rkd77/elinks.git
synced 2024-06-26 01:15:37 +00:00
[assert] element.checked
This commit is contained in:
parent
b9428b846c
commit
274b832fa6
31
test/ecmascript/assert/element.checked.html
Normal file
31
test/ecmascript/assert/element.checked.html
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>The input checked attribute</h1>
|
||||||
|
|
||||||
|
<form action="" method="get">
|
||||||
|
<input type="checkbox" name="vehicle1" value="Bike">
|
||||||
|
<label for="vehicle1"> I have a bike</label><br>
|
||||||
|
<input type="checkbox" name="vehicle2" value="Car">
|
||||||
|
<label for="vehicle2"> I have a car</label><br>
|
||||||
|
<input id="boat" type="checkbox" name="vehicle3" value="Boat" checked>
|
||||||
|
<label for="vehicle3"> I have a boat</label><br><br>
|
||||||
|
<input type="submit" value="Submit">
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function ch()
|
||||||
|
{
|
||||||
|
console.assert(document.getElementById('boat').checked, 'checked true');
|
||||||
|
}
|
||||||
|
|
||||||
|
console.error('element.checked.html');
|
||||||
|
ch();
|
||||||
|
console.exit(0);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<button onclick="ch();">CLICK</button>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user