+ 1
Question regarding calculator :
Finally I made a calculator , but I struck at a point , I defined a function to for finding the factorial of any number , first I added the symbol like this . function f(val) { document.getElementById('d').value+=val; } I don't know now how will I give the factorial as output on the screen of my calculator , Plz help . Note : Plz don't write down the portion to find the factorial , I already know it , just tell how can I display it . Thanks in Advance .
2 Antworten
+ 6
I don't know javascript much but this may work
suppose you have stored the factorial in variable "x"
then
var y = document.getElementById('d');
y.innerHTML = x;
+ 1
That's not possible it becomes an error . Is there any other way.
I tried to store the factorial as an exception and then define it in the last , but then the value of "value" and "val" came out of function . And then its again an error .