Can anyone tell what is problem in the following code... when i run the program in browser a blank white screen appears... I don't know why its not working... I am not very sure with the syntax...
I don't want to invoke the function by any events.. i just want to write a function and invoke it by a manual call...
<html>
<head>
<script language="javascript" type="text/javascript">
function salin()
{
var sal = prompt("Enter your current salary - ","");
var in = prompt("Enter the increment % - ","");
sal = parseInt(sal);
in = parseInt(in);
var nsal = sal +( sal*(in /100));
alert("Your new salary is - " + nsal);
}
salin();
</script>
</head>
<body>
</body>
</html>
inis reserved keyword in java-script so, your variable name cannot beinSyntaxError: missing variable name.