1a. Develop and demonstrate a XHTML file that includes
JavaScript script for the following problems.
Input : A number n obtained using prompt
Output: The first n Fibonacci numbers
Lab 1a Program ( Fibonacci Program )
Fibonacci Numbers are:
Output:-
?
1b. Develop and demonstrate a XHTML file that includes
JavaScript script for the following problems.
Input : A number n obtained using prompt
Output: A table of numbers from 1 to n and their squares using
alert
Lab 1b Program
Output:-
?
2a. Develop and demonstrate, using JavaScript script, a XHTML
Document that collects the USN (the valid format is: A digit from
1 to 4 followed by two upper-case characters followed by two
digits followed by three upper-case characters followed by three
digits; no embedded spaces allowed) of the user. Event handler
must be included for the form element that collects this
information to validate the input. Messages in the alert windows
must be produced when errors are detected.
Lab 2a Program (USN Validation)
Lab Exercise 2a
Output:-
?
2b. Modify the above program to get the current semester also
(Restricted to be a number from 1 to 6)
Lab 2b Program (USN Validation)
Lab Exercise 2b
Output:-
?
3a. Develop and demonstrate, using JavaScript script, a XHTML
document that contains three short paragraphs of text, stacked
on top of each other, with only enough of each showing so that
the mouse cursor can be placed over some part of them. When
the cursor is placed over the exposed part of any paragraph, it
should rise to the top to because completely visible.
Lab 3a Practical Program
Output:-
?
3b. Modify the above document so that when a paragraph is moved
from the top stacking problem, it returns to its original position
rather than to the bottom.
Lab 3b Practical Program
Output:-
?
4a. Design an XML document to store information about a student
in an engineering college affiliated to VTU. The information
must include USN, Name, Name of the College, Branch, Year of
joining and e-mail id. Make up sample data for 3 students.
Create a CSS style sheet and use it to display the document.
4a.css
student
{
display:block;
width:250px;
padding:5px;
margin-bottom:10px;
border:5px double orange;
color:black;
background-color:aqua;
text-align:left;
}
name
{
display:block;
font-family:verdana,Arial;
font-size:18pt;
font-weight:bold;
}
usn
{
display:block;
font-family:verdana,Arial;
font-size:14pt;
}
branch,college,yearofjoin
{
display:inline;
font-family:verdana,Arial;
font-size:14pt;
}
email
{
display:inline;
font-family:verdana,Arial;
font-size=14pt;
}
4a.xml
INZ10MCA22
Ganesh
MCA
Government College
2010
ganesh@gmail.com
ICD10MCA49
Parvathi
MCA
Mount Carmel College
2010
parvathi@gmail.com
ICD10MCA51
Shiva
MCA
Government College
2010
shiva@gmail.com
Output:-
?
4b. Create an XSLT style sheet for one student element of the above
document and use it to create a display of that element.
4b.xml
INZ10MCA22
Ganesh
MCA
Government College
2010
ganesh@gmail.com
ICD10MCA49
Parvathi
MCA
Mount Carmel College
2010
parvathi@gmail.com
ICD10MCA51
Shiva
MCA
Government College
2010
shiva@gmail.com
4b.xsl
Student List
JavaScript script for the following problems.
Input : A number n obtained using prompt
Output: The first n Fibonacci numbers
Fibonacci Numbers are:
Output:-
?
1b. Develop and demonstrate a XHTML file that includes
JavaScript script for the following problems.
Input : A number n obtained using prompt
Output: A table of numbers from 1 to n and their squares using
alert
Output:-
?
2a. Develop and demonstrate, using JavaScript script, a XHTML
Document that collects the USN (the valid format is: A digit from
1 to 4 followed by two upper-case characters followed by two
digits followed by three upper-case characters followed by three
digits; no embedded spaces allowed) of the user. Event handler
must be included for the form element that collects this
information to validate the input. Messages in the alert windows
must be produced when errors are detected.
Lab Exercise 2a
Validate USN
Subject Name: Web Programming Lab
Output:-
?
2b. Modify the above program to get the current semester also
(Restricted to be a number from 1 to 6)
Lab Exercise 2b
Validate USN
Subject Name: Web Programming Lab
Output:-
?
3a. Develop and demonstrate, using JavaScript script, a XHTML
document that contains three short paragraphs of text, stacked
on top of each other, with only enough of each showing so that
the mouse cursor can be placed over some part of them. When
the cursor is placed over the exposed part of any paragraph, it
should rise to the top to because completely visible.
Stacking of Paragraphs
Text 1
Text 2
Text 3
Output:-
?
3b. Modify the above document so that when a paragraph is moved
from the top stacking problem, it returns to its original position
rather than to the bottom.
Stacking of Paragraphs
Text 1
Text 2
Text 3
Output:-
?
4a. Design an XML document to store information about a student
in an engineering college affiliated to VTU. The information
must include USN, Name, Name of the College, Branch, Year of
joining and e-mail id. Make up sample data for 3 students.
Create a CSS style sheet and use it to display the document.
4a.css
student
{
display:block;
width:250px;
padding:5px;
margin-bottom:10px;
border:5px double orange;
color:black;
background-color:aqua;
text-align:left;
}
name
{
display:block;
font-family:verdana,Arial;
font-size:18pt;
font-weight:bold;
}
usn
{
display:block;
font-family:verdana,Arial;
font-size:14pt;
}
branch,college,yearofjoin
{
display:inline;
font-family:verdana,Arial;
font-size:14pt;
}
{
display:inline;
font-family:verdana,Arial;
font-size=14pt;
}
4a.xml
Output:-
?
4b. Create an XSLT style sheet for one student element of the above
document and use it to create a display of that element.
4b.xml
4b.xsl