<!DOCTYPE html>
<html>
<body>
<script>
function compu()
{
var num;
num=parseInt(prompt("Enter The Number"));
if(num>0)
{
alert("Number is positive");
}
}
</script>
<p>Click one of the buttons to call a function</p>
<button onclick="compu()">Click for Compuhelp</button>
</body>
</html>
Click one of the buttons to call a function
<!DOCTYPE html>
<html>
<body>
<script>
function help()
{
var num;
num=parseInt(prompt("Enter The Number"));
if(num>0)
{
alert("Number is positive");
}
else
{
alert("Number is nagative");
}
}
</script>
<p>Click one of the buttons to call a function</p>
<button onclick="help()">Click for Compuhelp</button>
</body>
</html>
Click one of the buttons to call a function
<!DOCTYPE html>
<html>
<body>
<script>
function vinod()
{
var num;
num=parseInt(prompt("Enter The Number"));
if(num>0)
{
alert("Number is positive");
}
else if(num<0)
{
alert("Number is nagative");
}
else
{
alert("Number is Zero");
}
</script>
<p>Click one of the buttons to call a function</p>
<button onclick="vinod()">Click for Compuhelp</button>
</body>
</html>
Click one of the buttons to call a function