I\'m trying to display a text input inline with a dropdown button. I can\'t figure out how to do this though. Here\'s the HTML I\'ve tried (I\'ve put all of it on a single
This is the code for Bootstrap with input search dropdown. I search a lot then i try its in javascript and html with bootstrap,
HTML Code :
Javascript Code :
function doOn(obj)
{
if(obj.id=="mydef")
{
document.getElementById("def1").style.display="none";
document.getElementById("def").style.display="block";
}
if(obj.id=="search")
{
document.getElementById("def").style.display="none";
document.getElementById("def1").innerHTML='- java
- Oracle
';
document.getElementById("def1").style.display="block";
}
}
function mydef(obj)
{
document.getElementById("search").value=obj.innerHTML;
document.getElementById("def1").style.display="none";
document.getElementById("def").style.display="none";
}
You can use jquery and json code also as per your requirement.
Output like: