UNIT 5,6 CSS CT-2
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. Explain how to create and display Rotating Banner in JavaScript with example
<html>
<head>
<script>
banner_array = new Array('Apple.png', 'Mango.png', 'Banana.png', 'Kiwi.png');
banner = 0;
function DisplayBanners() {
if (document.images) {
banner++;
if (banner == banner_array.length) {
banner = 0;
}
document.ChangeBanner.src = banner_array[banner];
setTimeout(DisplayBanners, 5000);
}
}
</script>
</head>
<body onload="DisplayBanners()">
<center>
<img src="banner1.png" width="100%" height="150" name="ChangeBanner"/>
</center>
</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
2.Form regular expressions for following :
**(i) Validation of email address.
**(ii) Validation of adhaar card. Format is
dddd – dddd – dddd
**(iii) Validation of phone number. Format is
(ddd) – (dddddddd
3.List any three properties of regular expression objects and state their use
4.Explain Frameset tag along with its attribute
To define a frameset we use a <frameset> tag. The <frameset> element holds one or more
frames. Each <frame> element may contain a separate document. The <frameset> element
defines the number of columns or rows present in the frameset, and value of
percentage/pixels of space will occupy each of them.
5. Construct a JavaScript code for defining the multiple frames in a webpage in matrix
form