+ 4
Dropdown menus?
Just wondering how to make dropdowns. Can anyone help me?
3 ответов
+ 5
You can search for codes on our Code Playground
https://code.sololearn.com/WGMGG1rb1254/?ref=app
https://code.sololearn.com/WFeCoHxda9us/?ref=app
+ 10
This is bootstrap dropdown. To use it u have to add bootstrap meta, css and js in the head before.
<div class="container">
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Languages
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li>English</li>
<li>Spanish</li>
<li class="divider"></li>
<li class="dropdown-header">Coding</li>
<li>C++</li>
<li>Java</li>
</ul>
</div>
</div>
The head section :
<head>
<meta charset="utf-8">
<!-- Responsive -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
0
What will this form send to the database when the second option is selected?
<form>
<select name="pet">
<option
value="cat">Opt 1</option>
<option
value="dog">Opt 2</option>
</select>
</form>
HTML
Opt 2
cat
dog