How can I make a input drop-down?
So I want to make a drop-down menu, where users don't have to choose the the given options and can make their own, but I can't find a way to do this, does anyone have way to make this with javascript and HTML?
Voters
Andy_4sberg (50)
Make a link or button that hides/shows a form with text inputs.
This worked for me:
<script>
function something() {
// Put code here
}
function visible() {
var is_visible = document.getElementById("menu");
if (is_visible.style.visibility==='visible') {
is_visible.style.visibility='hidden';
} else {
is_visible.style.visibility='visible';
}
}
</script>
<button onclick="visible()">Drop down menu</button>
<form id="menu" style="visibility: hidden;">
<input type="text" placeholder="Textbox one" onchange="something()" id="txtboxone">
<br>
<input type="text" placeholder="Textbox two" onchange="something()" id="txtboxtwo">
</form>
use something like an radio, the industry standard:
and its so easy no js required.