Skip to content

Commit faea44e

Browse files
committed
Select and Datalist
1 parent 143c389 commit faea44e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,6 +1296,30 @@ Example: 03
12961296
#### Q. What is progressive rendering?
12971297
*TODO*
12981298

1299+
#### Q. What is difference between Select and Datalist?
1300+
For the select element, the user is required to select one of the options you've given. For the datalist element, it is suggested that the user select one of the options you've given, but he can actually enter anything he wants in the input.
1301+
1302+
**Select-Option**
1303+
```html
1304+
<select name="browser">
1305+
<option value="firefox">Firefox</option>
1306+
<option value="ie">IE</option>
1307+
<option value="chrome">Chrome</option>
1308+
<option value="opera">Opera</option>
1309+
<option value="safari">Safari</option>
1310+
</select>
1311+
```
1312+
**Datalist-Option**
1313+
```html
1314+
<input type="text" list="browsers">
1315+
<datalist id="browsers">
1316+
<option value="Firefox">
1317+
<option value="IE">
1318+
<option value="Chrome">
1319+
<option value="Opera">
1320+
<option value="Safari">
1321+
</datalist>
1322+
```
12991323
<div align="right">
13001324
<b><a href="#">↥ back to top</a></b>
13011325
</div>

0 commit comments

Comments
 (0)