3
<html>
<head>
<title>HTML Frames</title>
</head> <frameset rows="10%,80%,10%">
<frame name="top" src="/html/top_frame.htm" />
<frame name="main" src="/html/main_frame.htm" />
<frame name="bottom" src="/html/bottom_frame.htm" /> <noframes>
<body> Your browser does not support frames. </body> </noframes>
</frameset> </html>
11.What is the function of alert boxes in javascript?
Alert boxes
An alert dialog box is mostly used to give a warning message to the users.
alert ( “messeage”)
Where
alert – function name
message – to be displayed
Example 1:
<html>
<body>
<button onclick="myFunction()">Try it</button>
<script> function myFunction() { alert("Hello! I am an alert box!"); } </script>
</body>
</html>
12.What are the scriptlets? Give example.
Scriptlets
In JSP, java code can be written inside the jsp page using the scriptlet tag.
Syntax
<% java source code %>
The scriplet contains any number of valid java language statements only. Any text, HTML tags or JSP
elements must be outside the scriplet.
Example :
<html>
<body>
<% System.out.print("welcome to jsp"); %>
</body>
</html>
13.Write a JSP program to convert entered text into upper case.
<html>
<body>
<%
String s=‖web programming‖;
String s1=s.toUpperCase();
Out.println(―converted uppercase text is :‖+s1);
%>
</body>
</html>
Output:
Converted uppercase text is: WEB PROGRAMMNG