request this program

Ads
 

request this program

if three text box value in my program i want to check the three input boxes values and display greatest two values

View Answers

July 22, 2011 at 12:08 PM

<html>
<script>
function check(){
    var n1=document.getElementById("num1").value;
    var n2=document.getElementById("num2").value;
    var n3=document.getElementById("num3").value;

    if((!isNaN(n1))&&(!isNaN(n2))&&(!isNaN(n3))){
        var num1=parseInt(n1);
        var num2=parseInt(n2);
        var num3=parseInt(n3);
        var secondhighest;
        var highest=Math.max(num1,num2,num3);
        if(highest==num1){
           secondhighest=Math.max(num2,num3);
        }
        if(highest==num2){
           secondhighest=Math.max(num1,num3);
        }
        if(highest==num3){
           secondhighest=Math.max(num1,num2);
        }
        alert("Greatest Number: "+highest+" and Second Greatest Number: "+secondhighest);
    }
    else{
    alert("Entered values are not an integer!");
    var n1=document.getElementById("num1").value=" ";
    var n2=document.getElementById("num2").value=" ";
    var n3=document.getElementById("num3").value=" ";
    }
}
</script>
<table>
<tr><td>Enter Number1</td><td><input type="text" id="num1"></td></tr>
<tr><td>Enter Number2</td><td><input type="text" id="num2"></td></tr>
<tr><td>Enter Number3</td><td><input type="text" id="num3"></td></tr>
<tr><td></td><td><input type="button" value="Check" onclick="check();"></td></tr>
</html>

Ads









Related Tutorials/Questions & Answers:
request this program
request this program  if three text box value in my program i want to check the three input boxes values and display greatest two values
Request Parameters in JSP
Request Parameters in JSP       In this section, you will study about the various request parameters. HttpServletRequest interface is responsible for providing request
Advertisements
program
program  write a html program in show table and this word in box
program
program  write a program different between to dates in terms of days in java
program
program  write a javascript program to create a application form with validation
program
program  write a program reversee a string. input-hi this is roseindia output-roseindia is this hi
program
program  develop a servlet to insert the data in the database from our program in the table stored in the database
program
program  WAP a java program to form 1/2+3/4+5/6+7/8 series
program
program  write a java program to input a no. and print wheather the no. is a special no or not. (special no. are those no whose factorial of the sum of digit of the no is same as the original
program
program  how to improve programming skills plss tell some tips..i am understanding concepts but unable to write program so,pls give some guideness plsss
Program
Program  a program to prove that default constructor of super class is available to subclass by default. Define a parameterize constructor for super class to store name = ‚??Tommy‚?? age=‚??23‚?? and call this constructor
Program
Program  a program to create two classes Commercial and Domestic. Override the method calculatebill() of Commercial class(Rs.8 per unit) into Domestic class(Rs 6 per unit) to compute electricity bill for both classes
program
program  no i want a program that shows how merge sort algorithm works in graphical representations like numbers are taken in circles and computation... in rectangles or circles wat ever it may be. the theme of program is to show algorithm
program
program  Write a JSP Program, which displays a web page containing the name of the Courses, Courses being offered currently, number of students enrolled in each course, new courses to be offered, eligibility criteria for taking
program
program  i want a progra in java to print a sentence in alphabetic order, taking the input from the user.the program should writen without using the array for example : if input= this is a cat then output sould = a cat
program
program  Write a JSP Program, which displays a web page containing two web links one for your profiling and other for the schedule of theory of practical classes of your Batch. When one click on link for getting your profile
program
program  Write a program to print details of a week for a particular day using array of objects Integer and String. OUTPUT: First Day of Week is Monday Second Day of Week is Tuesday Third Day of Week is Wednesday Forth Day
ModuleNotFoundError: No module named 'request'
ModuleNotFoundError: No module named 'request'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'request' How to remove the ModuleNotFoundError: No module named 'request
How to send the request and get the request?
How to send the request and get the request?  how to send a request to a JSP file in another domain in the same server and get the request done i.e how to include JSP file of one domain to another doamin JSP within in the same
request to help
request to help   how to write the program for the following details in java Employee Information System An organization maintains the following data about each employee. Employee Class Fields: int Employee ID String Name
ModuleNotFoundError: No module named 'aiohttp-request'
ModuleNotFoundError: No module named 'aiohttp-request'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'aiohttp-request' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'async-request'
ModuleNotFoundError: No module named 'async-request'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'async-request' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'async-request'
ModuleNotFoundError: No module named 'async-request'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'async-request' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'async-request'
ModuleNotFoundError: No module named 'async-request'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'async-request' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'async-request'
ModuleNotFoundError: No module named 'async-request'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'async-request' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'async-request'
ModuleNotFoundError: No module named 'async-request'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'async-request' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'async-request'
ModuleNotFoundError: No module named 'async-request'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'async-request' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'async-request'
ModuleNotFoundError: No module named 'async-request'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'async-request' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'backports.method_request'
ModuleNotFoundError: No module named 'backports.method_request'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'backports.method_request' How to remove
ModuleNotFoundError: No module named 'bottle-request'
ModuleNotFoundError: No module named 'bottle-request'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'bottle-request' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'django-request'
ModuleNotFoundError: No module named 'django-request'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'django-request' How to remove the ModuleNotFoundError: No module named

Ads