Thursday, 26 June 2014

html program for button click count

 html program for button click count


<html>
<head>
<title>evm</title>
<script type="text/javascript">
var x=0;
var y=0;
var z=0;
var w=0;
function A()
{
z=z+1;
}
function b()
{
w=w+1;
}
function c()
{
x=x+1;
}
function d()
{
y=y+1;
}
function total()
{
document.f1.fied1.value=z;
document.f1.fied2.value=w;
document.f1.fied3.value=x;
document.f1.fied4.value=y;
}
</script>
</head>

<body>
<form name="f1">
<input type="button" value="tdp" style="background-color:yellow; width:200px;height:50px"

onClick="return A()"><br>
<input type="button" value="ycp" style="background-color:blue; width:200px;height:50px"

onClick="return b()"><br>
<input type="button" value="congress" style="background-color:red; width:200px;height:50px"

onClick="return c()"><br>
<input type="button" value="mim" style="background-color:green; width:200px;height:50px"

onClick="return d()">

<br>
<br>


tdp<input type="text" name="fied1"><br>
ycp<input type="text" name="fied2"><br>
con<input type="text" name="fied3"><br>
mim<input type="text" name="fied4"><br>
<input type="button" value="total" onClick="return total()">
<input type="reset" value="reset">
</body>
</html>



Output


No comments: