First program of adding two numbers in JSP
< %@ page language="java"% >
< html >
< head >
< title > Add number program in JSP< /title >
< /head >
< body >
< %
int a=5;
int b=2;
int result=a+b;
out.print("Additon of a and b :"+result);
% >
< /body >
< /html >
Second program of subtraction two numbers in JSP
< %@ page language="java"% >
< html >
< head >
< title > Subtraction numbers program in JSP< /title >
< /head >
< body >
< %
int a=5;
int b=2;
int result=a-b;
out.print("Subtraction of a and b :"+result);
% >
< /body >
< /html >
Third program of print even numbers in JSP
< %@ page language="java"% >
< html >
< head >
< title > Even number program in JSP< /title >
< /head >
< body >
< %
for(int i=0;i< =10;i++)
{
if((i%2)==0)
{
out.print("Even number :"+i);
out.print("< br >");
}
}
% >
< /body >
< /html >
Forth program of print odd numbers in JSP
< %@ page language="java"% >
< html >
< head >
< title > Odd number program in JSP< /title >
< /head >
< body >
< %
for(int i=0;i< =10;i++)
{
if((i%2)!=0)
{
out.print("Odd number :"+i);
out.print("< br >");
}
}
% >
< /body >
< /html >
Wednesday, February 10, 2010
Bind Some Event to Element and trigger that function when click the element
Scenario: Suppose if we used same click event function in various web pages. if you want do some logic some page button for that need to re...
-
Find highcharts which are loaded in the page and then convert chart into png using jquery Charts are loaded through the ajax See the e...
-
// check the amount greater... if(Math.max(parseFloat(amount).toFixed(2),parseFloat(bal).toFixed(2))==parseFloat(amount).toFixed(2)) { ...