Solutions Implemented By Prof USHA CS and Prof SACHIN DN, VVCE, Mysuru.

VTU-WebTechnologyLabPrograms-15CSL77

  1. Write a JavaScript to design a simple calculator to perform the following operations: sum, product, difference and quotient.
  2. Write a JavaScript that calculates the squares and cubes of the numbers from 0 to 10 and outputs HTML text that displays the resulting values in an HTML table format.
  3. Write a JavaScript code that displays text “TEXT-GROWING” with increasing font size in the interval of 100ms in RED COLOR, when the font size reaches 50pt it displays “TEXT-SHRINKING” in BLUE color. Then the font size decreases to 5pt.
  4. Develop and demonstrate a HTML5 file that includes JavaScript script that uses functions for the following problems: a. Parameter: A string b. Output: The position in the string of the left-most vowel c. Parameter: A number d. Output: The number with its digits in the reverse order
  5. Design an XML document to store information about a student in an engineering college affiliated to VTU. The information must include USN, Name, and Name of the College, Branch, Year of Joining, and email id. Make up sample data for 3 students. Create a CSS style sheet and use it to display the document.
  6. Write a PHP program to keep track of the number of visitors visiting the web page and to display this count of visitors, with proper headings.
  7. Write a PHP program to display a digital clock which displays the current time of the server.
  8. Write the PHP programs to do the following: a. Implement simple calculator operations. b. Find the transpose of a matrix. c. Multiplication of two matrices. d. Addition of two matrices.
  9. Write a PHP program named states.py that declares a variable states with value "Mississippi Alabama Texas Massachusetts Kansas". write a PHP program that does the following: a. Search for a word in variable states that ends in xas. Store this word in element 0 of a list named statesList. b. Search for a word in states that begins with k and ends in s. Perform a caseinsensitive comparison. [Note: Passing re.Ias a second parameter to method compile performs a case-insensitive comparison.] Store this word in element1 of statesList. c. Search for a word in states that begins with M and ends in s. Store this word in element 2 of the list. d. Search for a word in states that ends in a. Store this word in element 3 of the list.
  10. Write a PHP program to sort the student records which are stored in the database using selection sort.