21203B0010 PR7 - CSS
21203B0010 PR7 - CSS
Experiment No: 7
• Program Code 2:
<html>
<head>
<script>
function over() {
document.write ("Mouse Over");
}
function out() {
document.write ("Mouse Out");
}
</script>
</head>
<body>
<p>Bring your mouse inside the division to see the result:</p>
<div onmouseover="over()" onmouseout="out()">
<h2> This is inside the division </h2>
</div>
</body>
</html>
<html>
<head>
<title>Dynamic Option List</title>
</head>
<body>
<label for="dynamicSelect">Choose a fruit:</label>
<select id="dynamicSelect">
<option value="apple">Apple</option>
<option value="banana">Banana</option>
<option value="cherry">Cherry</option>
</select>
<button id="changeOptions">Change Options</button>
<script>
// Get references to the select element and the button
const selectElement = document.getElementById("dynamicSelect");
const changeButton = document.getElementById("changeOptions");
<script>
// Get references to input elements and the button
const firstNameInput = document.getElementById("firstName");
const lastNameInput = document.getElementById("lastName");
const emailInput = document.getElementById("email");
const generateButton = document.getElementById("generateEmail");