Professional Documents
Culture Documents
html -Notepad
File Edit Format View Help
C O File | C:/Users/nagabhushan/Desktop/program1.ntm<IDOCTYPE html>
<html>
<head>
Simple Caleulator <title> Program1</title
script type= "text/javascript"> function update(value){
35 document.getElementByld("display").value += value
function result){
document.getElementById("display"). value =eval(document.getElementById("display"). value):
23x
function reset(){ document. getElementById("display").value = ":
/script>
<head
<body
<hl> Simple Calculator </hl>
<formname="myForm">
<table border-2>
stdalign="center">
sinput type="text" id="display" ><br >
/td
<tr>
Std>
<input type="button" name="7" value" 7 " onclick="update(7)"/>
"
<input type="button" name="6" value=" 6 onclick="update(6)" />
c i n p u t type="button" name="." value=" - " onclick="update(-)"/>
Ln 11, Col 45
p r o g r a m 3 . h t m l - Notepad
Program3
File Edit Format View Help
C OFile | C:/Users/nagabhushan/Desktop/program3.html <head
stitle>Program3</title>
<head>
Text-GroWing body>
sp id="txt"></p>
SCript>
var myVar = set+nterval(Growing, 100):
var my Varl
=
0;
var i=0;
function Growing() {
iitl;
document.body.style.fontSize = "5px";
document.getElementByld("txt").innerHTML Text-Growing:
document.body.style.fontSize=parseFlo (document.body.style.fontSize)+(i*1.0) + "px":
document.body.style.color-red:
if(document.body.style.fontSize-s0px) {
clearInterval(1my Var);
i=1
document.body.style.color blue;
my Varl = setlnterval(Shrinking, 100);
function Shrinking() {
document getElementByld("txr").innerHTML="Text-Shrinking:
document.body.style.fontSize=parseFloat(document.body.style.fontSize)-(i*1.0)+ "px":
ifdocument.body.style.fontSize"5px") {
clearInterval(my Var l1)
myVar set+nterval(Growing. 100);:
Iscript
/body>
<htm>
var my Varl 0;
=
var i-0
function Growing0 {
iitl;
document.body.style.fontSize = "5px":
document.getElementByld("txt").innerHTMI Text-Growing':
document.body.style.fontSize-parseFloat(document.body.style.fontsize)+(i*1.0) + "px":
document.body.style.color red;
ifdocument.body.style.fontSize=50px){
clearInterval(myVar);
i=1;
document.body.style.color-blue
myVarl =setlnterval(Shrinking, 100):
function Shrinking() {
document.getElementByld("txt").innerHTML"Text-Shrinking;
document.body.style.fontSize parseFloat(document.body.style.fontSize)- (i*1.0)+ "px":
ifdocument.body.style.fontSize="Spx") {
clearInterval(myVarl)
myvar = setlnterval(Growing, 100)
/script>
body>
</htnl>
C OFile | C/Users/nagabhushan/Desktop/program4a.html
vemana it
program4a.html - Notepad X
Click here
File Edit Format View Help
<IDOCTYPE html>
<html>
<head>
<title>Program 4A</title>
<SCTipt>
function vow(st) {
var pos;
pos =st.search(/ [aeiouAEIOU]/:
if(pos<0)
alert("patfterm not foundn");
else
alert("Position of the left most vowel is "+(post1);
/script
head>
<body
<hl>Displaying Lefmost Vowel<h1>
<fom>
sp>Enter the text</p>
<input type="text" id="voweltext" ><br/><br/
input type="button" value-="Click here" onclick="vow(voweltext.value):" >
</form>
<body>
<html>
Ln 7, Col S 100% Windows (CRLF UTF-E
program4b.html -Notepad
File Edit Format View Help
Program4b +
<IDOCTYPE html> C
<html>
File| C/Users/nagabhushan/Desktop/program4b.html
SHAREit Free Dow. (43 unread) - nagas..
<head>
title>Program4b</title>
SScript Reversing Number
finction rev(nl) {
n= parseInt(n1):
Enter a Number
if ( !isNaN(n))
16657 Reverse
var temp=0,rev = 0;
while n >0){
temp =1%10; program4b.html X +
rev = rev*10+temp;
C O File C/Users/nagabhushan/Desktop/program4b.html
n=n/10,
D-parselnt(n): The Reverse number is:75661
else
alert("Invalid input"):
/script>
</head>
<body
<h2>Reversing Number</h2>
<fom>
p>Enter a Number</p>
</student
USN: 1VI09CSO55
<student>
Name:Suma <usn span>USN: </span> 1VIO9CSO55 <husn>
College:VIT name> span>Name:/span>Suma S/name>
Branch:CSE Kcollege><span> College:/span>VIT <lcollege>
YOJ:2009 branch><span>Branch </span>CSE </branch>
email: suma@yahoo.com syoj Kspan> YOJ :</span>2009 <lyoj
----------------=------ email> <span> email: </span>suma@yahoo.com/email>
/student>
vtu>
3localhost/program6.php +
File Edit Format View Help
localhost/program6.php ?php
Stile ="count.txt;
You are visitor number:3
Scount= strval(file_get_contents(Sfile));
file_put_contents($file.(int)(Scount) + 1);
echo("You are visitor number:".Scount);
if(Soprnd="/")
Sres=Stxt l / Stxt2;
Result
<inputtype="number" name="res" value="<?php echo Sres; ?>"
<br><br >
Ln 8, Col 28 100% Windows (CRLA UTF-8
lab8-2.php - Notepad X
Clocalhost/lab8-2.php
File Edit Format View Help
C localhost/lab8-2.php
k?php
Smatrix = aray(
The input matrix is:4 12
634 array(4, 1, 2).
array(6, 3, 4)
echo Smatrix[Sr][sc]."t":
echo "<br \";
echo Smatrix[Sc][Sr]."\r:
echo "<br>":
Sres = Array():
SstatesArray[0]=(Sstate),
foreach($states1 as $state) {
ifpreg_match(k.*sS/i". (Sstate)))
SstatesArray[]] = (Sstate);
foreach(Sstates1 as Sstate) {
ifpreg_match(/"M. "sS/'. (Sstate))
SstatesArray[2] = (Sstate);
foreach(Sstates1 as Sstate) {
if(pregmatch(/aS/. (Sstate))
SstatesArray[3] = (Sstate):
print( "'statesArray[Selement) =
Svalue <br >"):