Hi friends, today i will tell you how to show content dynamically using Javascript.
Here i am creating a drop down that contains 3 options when user click on any option than corresponding content will display to you.
Code :
<!DOCTYPE html>
<html>
<head>
<title>
Drop Down With Javascript
</title>
<style>
h1
{
display:none;
}
</style>
<script>
function liveShow()
{
var value=document.getElementById('city').value;
if(value=="Chennai")
{
document.getElementById("chennai").style.display="block";
document.getElementById("bangalore").style.display="none";
document.getElementById("delhi").style.display="none";
}