Manejar argumentos y variables recibidas en JavaScript


/ Published in: JavaScript
Save to your folder(s)

Manejar argumentos y variables recibidas en JavaScript


Copy this code and paste it in your HTML
  1. <script type="text/javascript">
  2. <!--
  3.  
  4. function test_vars()
  5. {
  6. var argArr = test_vars.arguments;
  7. var argNum = argArr.length;
  8. for (var i = 0; i < argNum; i++)
  9. {
  10. alert("Argument " + i + " = " + argArr[i]);
  11. }
  12. }
  13. window.onload=foo('hello', 'world');
  14. //-->
  15. </script>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.