79 lines
1.8 KiB
HTML
79 lines
1.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
<title>form fields</title>
|
|
</head>
|
|
|
|
<body>
|
|
<form>
|
|
<label for="text">
|
|
<input type="text">
|
|
</label>
|
|
<label for="radio">
|
|
<input type="radio">
|
|
</label>
|
|
<label for="checkbox">
|
|
<input type="checkbox">
|
|
</label>
|
|
<label for="textarea">
|
|
<textarea name="" id="" cols="30" rows="10"></textarea>
|
|
</label>
|
|
<label for="select">
|
|
<select name="" id="">
|
|
<option value="1">1</option>
|
|
<option value="2">2</option>
|
|
</select>
|
|
</label>
|
|
</form>
|
|
</body>
|
|
<script>
|
|
document.querySelector('input[type="text"]').value = '1';
|
|
document.querySelector('input[type="radio"]').checked = true;
|
|
document.querySelector('input[type="checkbox"]').checked = true;
|
|
document.querySelector('textarea').value = '1234';
|
|
document.querySelector('select').value = '2';
|
|
</script>
|
|
|
|
</html>
|
|
|
|
<!-- TEST_DIVIDER -->
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
<title>form fields</title>
|
|
</head>
|
|
|
|
<body>
|
|
<form>
|
|
<label for="text">
|
|
<input type="text" value="1">
|
|
</label>
|
|
<label for="radio">
|
|
<input type="radio" checked="">
|
|
</label>
|
|
<label for="checkbox">
|
|
<input type="checkbox" checked="">
|
|
</label>
|
|
<label for="textarea">
|
|
<textarea name="" id="" cols="30" rows="10">1234</textarea>
|
|
</label>
|
|
<label for="select">
|
|
<select name="" id="" value="2">
|
|
<option value="1">1</option>
|
|
<option value="2" selected>2</option>
|
|
</select>
|
|
</label>
|
|
</form>
|
|
</body>
|
|
<noscript></noscript>
|
|
|
|
</html> |