nareshreporter
Programmer
Hi,
I have an external javascript function that returns a value. But im calling this function when ever user clicks a button (onclick event). How do i access that value in my html page.
EXAMPLE:
IN HTML:
<input type="button" name="btn" onclick="addNumbers(var1, var2)"
IN .JS FILE:
function addNumbers(num1, num2)
{
return num1 + num2;
}
Now how do i access this value in HTML page.
I appreciate if anyone could help me out.
Thanks in advance
I have an external javascript function that returns a value. But im calling this function when ever user clicks a button (onclick event). How do i access that value in my html page.
EXAMPLE:
IN HTML:
<input type="button" name="btn" onclick="addNumbers(var1, var2)"
IN .JS FILE:
function addNumbers(num1, num2)
{
return num1 + num2;
}
Now how do i access this value in HTML page.
I appreciate if anyone could help me out.
Thanks in advance