CSS Pract-13 Merged
CSS Pract-13 Merged
<!doctype html>
<html>
<head>
<script language="javascript">
function MouseRollover(MyImage) {
MyImage.src = "image1.jpg";
function MouseOut(MyImage) {
MyImage.src = "image2.jpg";
</script>
</head>
<body>
<div align="center">
</div>
</body>
</html>
OUTPUT:
2)JavaScript to Create rollover effect for text
<HTML>
<head>
</head>
<Body>
<table>
<tr>
<td>
<a>
</a>
</td>
<td>
<a
onmouseover="document.lang.src='Java.jpg'">
</a>
<br/><br/><br/><br/>
<a
onmouseover="document.lang.src='C++.jpg'">
</a>
<br/><br/><br/><br/>
<br/><br/><br/><br/>
</td>
</tr>
</table>
</body>
</html>
OUTPUT:
3)JavaScript to create rollover effect for text.
<HTML>
<Body>
</body>
</html>
OUTPUT:
Practical.No.14. Develop a webpage for implementing Menus
<html>
<head>
<script>
function displayPage(ch)
page = ch.options[ch.selectedIndex].value
if(page != "")
window.location = page
</script>
</head>
<body>
<option value="https://www.google.com">Google</option>
<option value="https://www.yahoo.com">Yahoo</option>
<option value="https://www.msbte.org.in">MSBTE</option>
</select>
</form>
</body>
</html>
Output:
<html>
<head>
<style>
.menu {
width: 150px;
border-style: solid;
border-width: 1px;
border-color: grey;
position: fixed;
display: none;
.menu-item {
height: 20px;
.menu-item:hover {
background-color: #6CB5FF;
cursor: pointer;
</style>
<script>
function showMenu()
menuBox = window.document.querySelector('.menu')
menuBox.style.display = 'block'
arguments[0].preventDefault()
menuDisplayed = true
function hideMenu()
if(menuDisplayed == true) {
menuBox.style.display = 'none'
}
}
</script>
</head>
<body>
<div class="menu">
<div class="menu-item">Google</div>
<div class="menu-item">Facebook</div>
<hr>
<div class="menu-item">MSN</div>
<div class="menu-item">Bing</div>
</div>
</body>
</html>
Output: