×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Skippy1957
Added: Nov 25, 2016 6:58 AM
Views: 7
Tags: no tags
  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <p>This example calls a function which perfoms a calculation, and returns the result:</p>
  6.  
  7. <p id="demo"></p>
  8.  
  9. <script>
  10. function myFunction(a,b)
  11. {
  12.         return a*b;
  13. }
  14.                        
  15. document.getElementById("demo").innerHTML=myFunction(4,3);
  16. </script>
  17.  
  18. </body>
  19. </html>
  20.