Unit 5,6 Css Ct-2
Unit 5,6 Css Ct-2
1.Write a Java script to modify the status bar using on-MouseOver and on-MouseOut with
links. When the user moves his mouse over the link, it will display “MSBTE” in the status
bar. When the user moves his mouse away from the link the status bar will display nothing
<html>
<head>
<title>JavaScript Status Bar</title></head>
<body>
<a href="https://msbte.org.in/"
onMouseOver="window.status='MSBTE';return true"
onMouseOut="window.status='';return true">
MSBTE
</a>
</body>
</html>
2. Write a Javascript to create a pull – down menu with three options [Google, MSBTE,
Yahoo] once the user will select one of the options then user will be redirected to that site
<html>
<head>
<title>Pull Down Menu</title>
</head>
<body>
<select onchange="window.location.href=this.value">
<option value="">--Select a website--</option>
<option value="https://www.google.com">Google</option>
<option value="https://www.msbte.org.in">MSBTE</option>
<option value="https://www.yahoo.com">Yahoo</option>
</select>
</body>
</html>
3. List ways of protecting your web page and describe any one of them.
1)Hiding your source code
2)Disabling the right MouseButton
3) Hiding JavaScript
4) Concealing E-mail address.
1) Hiding your source code The source code for your web page—including your JavaScript—
is stored in the cache, the part of computer memory where the browser stores web pages
that were requested by the visitor. A sophisticated visitor can access the cache and thereby
gain access to the web page source code. However, you can place obstacles in the way of a
potential peeker. First, you can disable use of the right mouse button on your site so the
visitor can't access the View Source menu option on the context menu. This hides both your
HTML code and your JavaScript from the visitor. Nevertheless, the visitor can still use the
View menu's Source option to display your source code. In addition, you can store your
JavaScript on your web server instead of building it into your web page. The browser calls
the JavaScript from the web server when it is needed by your web page. Using this method,
the JavaScript isn't visible to the visitor, even if the visitor views the source code for the web
page.
UNIT 5
1.Explain text and image rollover
Text rollover
A text rollover is a web design effect where text changes in appearance—such as color, style,
or font—when a user hovers their cursor over it. This effect is commonly used to highlight
links or interactive elements, improving user experience by signaling clickable text.
Image rollover
An image rollover is a web design effect where an image changes to another image when
the user hovers their cursor over it. This technique is often used to create interactive and
visually engaging elements on websites, like buttons or links that react to user actions.
5. Construct a JavaScript code for defining the multiple frames in a webpage in matrix
form
<!DOCTYPE html>
<html>
<frameset rows="50%,25%,25%" cols="30%,70%">
<frame style="background-color: red;">
<frame style="background-color: blue;">
<frame style="background-color: green;">
<frame style="background-color: red;">
<frame style="background-color: blue;">
<frame style="background-color: green;">
</frameset>
</html>