Monday, 17 February 2020

WT-7


Q1. Write a java script program to accept a string from user and display the count of vowel characters from that string.

   

<html>

<head>

<script>

function PQR()

{

var str = document.getElementById('a').value;

var count = 0;

for (var i = 0; i < str.length; i++)

{

if (str.charAt(i).match(/[aeiouAEIOU]/))

{

count++;

}

}

alert(count);

}

</script>

</head>

<body>

Enter Text   : <input  id='a'> </br></br>

<button onclick="PQR()">click</button>

</body>

</html>


Q2. Write a HTML code to display Theory Time Table of FYBBA(CA). Use internal CSS to format the table


<html>
<head>
<style>
body
{
background-image: url("1.jpg");
}
</style>
</head>
<body>
<b><font color="red">Time Table 2020</font></b>
<table border=1>
<tr>
<td>Time</td>
<td>Mon</td>
<td>Tues</td>
<td>Wed</td>
<td>Thurs</td>
<td>Fri</td>
<td>Sat</td>
</tr>

<tr>
<td>09:00-09:45</td>
<td> Rdbms</td>
<td>C</td>
<td>OB</td>
<td>BM</td>
<td>F A/C</td>
<td>WT</td>
</tr>

</table>
</body>
</html>