Web 2020 makeup solution || BIM NOTES

3rd Semester

Q.no 11  & 16 :- checkout in web long answer question page .

Q.no 12 Q. write a javaSrcipt to validate a form with inputs name (cann’t be empty ) & contact (cann’t be empty .

//bim study notes
<html>
<head>
<script>
function validateForm() {
  var x = document.forms["myForm"]["fname"].value;
  var y = document.forms["myForm"]["Cname"].value;
  if (x == "")
  {
    alert("Name must be filled out");
    return false;
  }
  else if (y.length!=10)
  {
    alert("Contact must be 10 digit");
    return false;
  }
}
</script>
</head>
<body>
//bim study notes
<form name="myForm" action="/action_page.php" onsubmit="return validateForm()" method="post">
  Name: <input type="text" name="fname">
  Contact: <input type="text" name="Cname">
  <input type="submit" value="Submit">
</form>
</body>
</html>




Q.No 13 write a javascript to reverse the given input integer (e.g 426 (input ) to 624 (output).

//BIM Study Notes
<!doctype html>
<html>
<head>
<script>
function palin()
{
var a,no,b,temp=0;
no=Number(document.getElementById("no_input").value);
b=no;
while(no>0)
{
a=no%10;
no=parseInt(no/10);
temp=temp*10+a;
}
alert(temp);
}
</script>
</head>
//BIM Study Notes
<body>
Enter any Number: <input id="no_input">
<button onclick="palin()">Check</button></br></br>
</body>
</html>
//BIM Study Notes



Q.no 14

<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
	<script type="text/javascript">
		var fruitArray=['Apple','Orange','Mango'];
		fruitArray.unshift('Strawberry','Bananan','Guava');
		fruitArray.pop();
		fruitArray.pop();
		fruitArray.pop();
		var stringArray=fruitArray.toString();
		alert(stringArray);
	</script>
</body>
</html>




Q.No 15 write a html form for sending email with a form item like send to ,cc ,subject ,message & send button included.

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<form method="post">
  Send to: <input type="email" name="fname">
  <br>
  cc: <input type="email" name="cc">
  <br>
  Subject: <input type="text" name="sub">
  <br>
  Message: <textarea name="message" rows="10" cols="30"></textarea>
  <input type="submit" value="Submit">
</form>
</body>
</html>

Q.no 17 checkout image in question paper section

 <html>
<head>
<title>BIM Study Notes</title>
<style>
table, th, td{
border: 1px solid black;
border-collapse: collapse;
}
th, td{
padding: 10px;
}
</style>
 </head>
<body>
<h1>Students Details</h1>
<table width="50%" height="30%"
<tr>
<th rowspan="2">Name</th>
 <th colspan="3">Subjects</th>
 <th rowspan="2">total</th>
</tr>
<tr>
<th>computer</th>
<th>account</th>
<th>mathematics</th>
</tr>
<tr>
<td>Ram</td>
 <td>20</td>
<th>computer</th>
<th>account</th>
<th>mathematics</th>
 </tr>
<tr>
<td>Ram</td>
 <td>20</td>
 <td>30</td>
<td>40</td>
<td>90</td>
</tr>
<tr>
<td>Shyam</td>
 <td>30</td>
<td>20</td>
<td>50</td>
<td>100</td>
</tr>
<tr>
<td>Hari</td>
<td>10</tds
<td>10</td>
<td>10</td>
<td> 30</td>
</table>
 </body>
</html>




Leave a Reply

Your email address will not be published.