- 1
I am writing a program that will add two number and I have a sample... Is it correct ?
<html> <body> <p id ="element"></p> <script> function simpleFunction(a,b) { return a+b } document.getElementById("element").innerHTML=simpleFunction(1,4) </script> </body> </html>
5 Réponses
+ 3
Your code appears to be incomplete. Please use code playground to link codes for easy reproducibility.
From a brief scan if the remaining html tags were added </script></body></html>
It would work fine.
Specify and share the complete code if it doesn't.
+ 2
Why don't you run it and verify.
+ 2
Yes,Mohammad!
+ 1
I cant believe it!?
0
I edited it and it worked