oss correct format
oss correct format
Program
Home.html
<html>
<head>
<title> home</title>
</head>
<frameset rows="25%,*">
<frame src="frame1.html" >
<frameset cols="25%,75%">
<frame src="main.html" name="frame2" >
<frame src="click.html" name="frame3" >
</frameset>
</html>
Frame1.html
<html>
<head>
<title> frame1</title>
</head>
<body bgcolor="blue">
<h1 style="color.green;font-size:15pt">
</marquee>
</h1>
</body>
</html>
Click.html
<html>
<head>
<title>welcome</title>
</head>
<body bgcolor="black">
<font color=red>
<p>welcome to immaculate college </p>
location:cuddalore<br>
contact no:04142-221444<br>
website:www.imcw.in<br>
</font>
</body>
</html>
Main.html
<html>
<head>
<title>mainframe</title>
</head>
<body bgcolor="red">
<h3>
<a href="table.html"target="frame3">student details</a><br>
<a href="click.html"target="frame3">college details</a><br>
</h3>
</body>
</html>
Table.html
<html>
<head>
<title> table</title>
</head>
<body bgcolor="black">
<h1> student details</h1>
<table border="6" width="60%" align="center" bgcolor="cyan" border
color="red">
<tr>
<th>regno</th>
<th>name</th>
<th>oss</th>
<th>cc</th>
<th>rank</th>
</tr>
<tr>
<td>101</td>
<th>priya</td>
<th>90</td>
<th>90</td>
<th>I</td>
</tr>
<tr>
<td>102</td>
<th>kavya</td>
<th>80</td>
<th>70</td>
<th>I</td>
</tr>
<tr>
<td>103</td>
<th>sneha</td>
<th>90</td>
<th>80</td>
<th>I</td>
</tr>
</table>
</body>
</html>
Output
2. Create a web page incorporating CSS (Cascading Style Sheets)
Program
Dynamic.html
<html>
<head>
<title>HTML using CSS</title>
<link rel="stylesheet" href="mystyle.css" type="text/css">
</head>
<body pgcolor="lavender">>
<center>
<h1>IMMACULATE COLLEGE FOR WOMEN<br>
cuddalore<br>
</h1>
<h2>
Available courses<br>
</h2>
<h3>
Course offered<br>
UG Courses:
</h3>
<ul type="circle">
<li> B.sc computer science
<li> B.sc computer Application
<li> B.sc Maths
<li> B.sc Botany
<li> BA English
<li> BA tamil
<li> Bcom computer science
<li> Bcom computer Application
</ul>
<h3>PG Courses</h3>
<ul type="square">
<li> M.sc computer science
<li> M.sc computer Application
<li> M.sc Maths
<li> M.sc Botany
<li> MA English
<li> MA tamil
<li> Mcom computer science
<li> Mcom computer Application
</ul>
</body>
</html>
Mystyle.css
body
{
background-image:url("san1.jpg");
}
h1
{
color:maroon;
font-family:arial;
text-decoration:underline;
}
h2
{
color:blue;
font-family:times new roman;
text-decoration:underline;
}
h3
{
color:green;
font-family:algerian;
text-decoration:italic;
}
li
{
color:red;
}
ul
{
list-style: square inside url("san.gif");
}
Output
3. Write a shell program to find the factorial of an integer positive number
Program
clear
read n
f=1
until [ $n -lt 1 ]
do
f=` expr $f \* $n `
n=` expr $n - 1`
done
Factorial of 6 is : 720
4. Write a shell program to find the details of a user session
Program
#!/bin/bash
#here we are you going to develop a script for various options on user
accounts
echo -e "\n
[ 1 ] for listing all the user accounts name \n
[ 2 ] for counting the number of logged-in user accounts \n
[ 3 ] for listing the names of currently logged-in users\n
[ 4 ] for checking the groups to which the current user belong \n"
#Now take user input
read userInput
#Now we will use switch cases for various input operations
case $userInput in
1)
#syntax lslogins <option[=output field]>
lslogins -o USER
;;
2)
#syntax who <option> <user optional>
#grep used to filter
who --count | grep users
;;
3)
#-q option is to count the number of users and print the logged-in users.
# instead of -q, --count can also be used.
# -v is used to exclude any pattern
who -q | grep -v users
;;
4)
#syntax groups <option> [USERNAME]
groups
;;
*)
echo -e "Please Enter Correct Input \n"
;;
5. Create a simple calculator in Java script.
Program:
<html>
<head><title>Calculator</title>
<script language="javascript">
var inputstring=" "
function updatestring(value)
{
inputstring += value;
document.calculator.input.value=inputstring;
}
</script>
</head>
<body background=flow-yellow.jpg>
<form name="calculator">
<table border=5 bordercolor=pink bgcolor="#ffffcc"><tr ><td>
<input type="text" name="input" maxlength=15 size=27><br />
<input type="button" value="clear"onclick="input.value=' ';inputstring=' '
">
<input type="button" value=" mod"onclick="updatestring('%')">
<input type="button" value=" * " onclick="updatestring('*')"><br />
<input type="button" value=" 7 " onclick="updatestring('7')">
<input type="button" value=" 8 " onclick="updatestring('8')">
<input type="button" value=" 9 " onclick="updatestring('9')">
<input type="button" value=" / " onclick="updatestring('/')"><br />
<input type="button" value=" 4 " onclick="updatestring('4')">
<input type="button" value=" 5 " onclick="updatestring('5')">
<input type="button" value=" 6 " onclick="updatestring('6')">
<input type="button" value=" - " onclick="updatestring('-')"><br />
<input type="button" value=" 1 " onclick="updatestring('1')">
<input type="button" value=" 2 " onclick="updatestring('2')">
<input type="button" value=" 3 " onclick="updatestring('3')">
<input type="button" value=" + " onclick="updatestring('+')"><br />
<input type="button" value=" 0 " onclick="updatestring('0')">
<input type="button" value=" 00 " onclick="updatestring('00')">
<input type="button" value=" . " onclick="updatestring('.')">
<input type="button" value=" = "
onclick="input.value=eval(inputstring);">
</td>
</tr>
</table>
</form>
</body>
</html>
Output
6. Write a JavaScript program to scroll your name in the scroll bar.
Program:
<html>
<head>
<script language="javascript">
document.write('<style type="text/css">');
document.write("textarea{");
document.write("background-color:yellow;");
document.write("scroll-highlight-color:red;");
document.write("scrollbar-3dlight-color:green;");
document.write("scrollbar-arrow-color:purle;");
document.write("scrollbar-darkshadow-color:teal;");
document.write("scrollbar-face-color:navy;");
document.write("scrollbar-highlight-color:olive;");
document.write("scrollbar-shadow-color:gray;");
document.write("scrollbar-track-color:lime;");
document.write("}");
document.write("</style>");
</script>
</head>
<body bgcolor="lavender">
<center><u><b>JAVA SCRIPT IN SCROLL BAR</b></u></center><br>
<center><textarea id="textarea" rows="10" cols="30">
John cristober
John cristober
John cristober
John cristober
John cristober
John cristober
John cristober
John cristober
John cristober
John cristober
</textarea>
</center>
</body>
</html>
Output
7. Develop a program and check message passing mechanism
between pages
Program
Page1.php
<html>
<head>
<title>Message Passing</title>
</head>
<body>
<center>
<form action=”page2.php” method=”POST”>
My name is:
<br><input type=”text” name =”uname”><br<
My favorite word is:
<br><input type=”text” name =”fword”>
<input type=”submit” name=”submit” value=”send”>
</center>
</form>
</body>
</html>
Page2.php:
<html>
<head>
<title>Message Passing</title>
</head>
<body bgcolor=”voilrt” tect=”blue”>
<h1> <u>MESSAGE PASSING IN PHP </u></h1><br>
<?php
$name=$_POST[‘uname’];
$word=$_POST[‘fword’];
echo “your name is:$name<br>
echo “favourite word is::$word<br>
?>
</body>
</html>
Output
8. APPLICATION FOR EMAIL REGISTRATION AND LOGIN USING
PHP AND MYSQL
PROGRAM
Registeration .php
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Registration</title>
</head>
<body>
<?php
require('db.php');
if (isset($_REQUEST['username'])) {
// removes backslashes
$username = stripslashes($_REQUEST['username']);
$password = stripslashes($_REQUEST['password']);
if ($result) {
</div>";
} else {
} else {
?>
<h1 class="login-title">Registration</h1>
</form>
<?php
?>
</body>
</html>
Login.php
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Login</title>
</head>
<body>
<?php
require('db.php');
session_start();
if (isset($_POST['username'])) {
$password = stripslashes($_REQUEST['password']);
$rows = mysqli_num_rows($result);
if ($rows == 1) {
$_SESSION['username'] = $username;
header("Location: dashboard.php");
} else {
<h3>Incorrect Username/password.</h3><br/>
</div>";
} else {
?>
<h1 class="login-title">Login</h1>
<input type="text" class="login-input" name="username"
placeholder="Username" autofocus="true"/>
</form>
<?php
?>
</body>
</html>
Output
9. Program to create a File and write the Data into it using PHP
Program
<html>
<head>
<title>PHP Script Create a .txt file & write content in it in PHP</title>
</head>
<body>
<h2>Write a PHP program Create a .txt file & write content in it</h2>
<?php
if($_POST)
{
$txt = $_POST['text'];
fclose($myfile);
}
?>
</body>
</html>
Output
10. PROGRAM TO PERFORM THE STRING OPERATION USING PERL.
PROGRAM
#!usr/bin/perl
$a="hello";
$b="world";
print $a.$b,"\n";
$str="-";
print $str x 80,"/n";
@a=(10..25);
print "@a\n";
OUTPUT