To Create this output write the following code in notepad and run it in Internet Broswer.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Online Testing Website</title>
<style type="text/css">
h1{color:Orange;}
H2{COLOR:RED;}
</style>
<script type="text/javascript">
function selectexam() {
alert('You have select ' + selectExam.value);
mainframe.document.body.innerHTML = "";
if (selectExam.value == "C++") {
mainframe.document.write("You Have Selected C++ Exam");
mainframe.document.body.style.background = "ff3333";
}
if (selectExam.value == "Java"){
mainframe.document.write("You Have Selected Java Exam");
mainframe.document.body.style.background = "66cc33";
}
if (selectExam.value == "PHP"){
mainframe.document.write("You Have Selected PHP Exam");
mainframe.document.body.style.background = "00ff99";
}
if (selectExam.value == "MySQL"){
mainframe.document.write("You Have Selected MySQL Exam");
mainframe.document.body.style.background = "66ccff";
}
if (selectExam.value == "Oracle"){
mainframe.document.write("You Have Selected Oracle Exam");
mainframe.document.body.style.background = "ff00ff";
}
if (selectExam.value == "ASP.NET"){
mainframe.document.write("You Have Selected ASP.NET Exam");
mainframe.document.body.style.background = "ccff33";
}
if (selectExam.value == "C#.NET"){
mainframe.document.write("You Have Selected C#.NET Exam");
mainframe.document.body.style.background = "RED";
}
}
</script>
</head>
<body>
<div id="BodyContent">
<h1>Online Testing System</h1>
<h2>Welcome Students</h2>
<hr />
Please Select The Exam:
<select id="selectExam">
<option value="C++">C++</option>
<option value="Java">Java</option>
<option value="PHP">PHP</option>
<option value="MySQL">MySQL</option>
<option value="Oracle">Oracle</option>
<option value="ASP.NET">ASP.NET</option>
<option value="C#.NET">C#.NET</option>
</select>
<input id="buttonselect" type="button" value="Select" onclick="selectexam()" />
</div>
<div id="Frameid"><iframe id="mainframe" name="mainframe" frameborder=1 width=1300 height=500></iframe></div>
</body>
</html>