Skip to main content

If else Condition Scholarship

<!DOCTYPE html>

<html>

<head>

<body>

<h1>Determine Scholarship </h1>

<p>Enter your details : </p>

<fieldset>

<label>Enter your name </label>

<input type="text" onfocus="this.value=''" name="fname" id="fname" value="" /> <br> <!-- create input text box for name -->

<label>Enter your average grade </label>

<input type="number" onfocus="this.value=''" name="grade" id="grade" value="" /> <br> <!-- create input text box

for grade -->

<button onclick="display()" name="Display" id="display" value="Display" > Display </button> <!--button will call display

function in javascript -->

</fieldset>

<p id="demo"></p> <!--paragraph where name and grade will display -->

<p id="demo2"></p> <!--paragraph where remarks will display -->

<script>

function display()

{

fname=document.getElementById("fname").value; //get the input name in the textbox fname

grade=document.getElementById("grade").value; //get the input grade in the textbox age

document.getElementById("demo").innerHTML = "Name " + fname + "<br> Grade :" +grade; // display name and grade in the paragraph demo...

if(grade>=99)

remarks = "<font color=blue> <u><emp> Congratulations you are qualifed for 100% Scholarship" ;

else

remarks = " <font color=red> <i> Sorry you are not qualified for Scholarship" ;

document.getElementById("demo2").innerHTML = "<br> Remarks :" +remarks; //display the remarks in another paragraph demo2

}

</script>

</body>

</html>

Comments

Popular posts from this blog

Exercise 12-14: Responsive Web Design, Tutorial Web Page and Activities Compilation

 PROJECT; Tutorial about how to do the Exercise 7: Select Box Price List First the Html code for this exercise is put the usually code the "<!DOCTYPE html> <html> <head>"  if you don't put this usually code then your labored to be made is nonsense so you need this and we will go to put this meta name "<meta name="viewport" content="width=device-width, initial-scale=1">" and the Title of what exercise are you doing like this "<title>Exercise 007: JavaScript Selected Value</title>"  and also you will link this html to the .css code or file like this  "<link rel="stylesheet" href="Exercise007SelectedValueinte2.css"> </head>" Next we will go to the main exercise that we will do how to do the Price List  don't forget the body "<body>" and like the title the main font of this exercise "<h1 class="font1"> Products & Pr...

Exercise 10: Animation (Finals Web Prog)

(Code for HTML:) <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Exercise 010 Animated Web page</title> <link rel="stylesheet" href="Exercise10AnimatedWebpage.css"> </head> <body> <div> <h1 style="font-size:40px;"> ABOUT MYSELF  </h1> </div> <br> <br> <br> <br> <br> <br> <br> <br>  <p style="text-align: justify; text-indent: 50px;">  Hi I'm Jillian Marren Dela Cruz. You can call me "Jill or Jillian" i'm currently 3rd year Multimedia Arts Student. 20 years of Age. I chose multimeida because i want to enchance my skills and i'm willing to learn about everything. I'm November Babies and My zodiac sign is Sagittarius. The Sagittarius Traits is Curious and energetic, Sagittarius is one of the biggest travelers among all...

Image

<!DOCTYPE html> <html> <head> <style> header { position:fixed; font-family: 'Arial Black'; top:0px; left:0px; width:98%; height:10%; color:#FFFFFF; background-color: #CBC6DC; background-repeat: no-repeat; background-attachment: fixed; background-size: 200% 50%; font-size: 50px; padding:15px; } footer {   text-align: center;   padding-top:20px;   padding-right: 200px;   padding-bottom: 700px;   padding-left: 325px;   background-color: #FFFFF;   color: black;   font-size: 12px;   width: 500px; }  body { background-image: url('jillian.jpg'); background-repeat: no-repeat; background-attachment: fixed;yy background-size: 100% auto; padding: 90px; color: white; font-family: "Arial Black"; font-size: 15px; text-align: center; } .frame1 { background-color: #CBC6DC; color: #FFFFFF; font-family: 'Arial Black'; margin-left: 0px; padding-top: 10px; padding: 10px; float: left; width: 517px; } .frame2 { backgr...