달력

22025  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
반응형

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html lang="utf-8">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
 
  <script type="text/javascript">
    function MyArrayParam(a, b, c, d)
    {// 구브라우져에서 동작 됨
      document.write("a값 : " + a);
      document.write("</br>");
      document.write("b값 : " + b);
      document.write("</br>");
      document.write("c값 : " + c);
      document.write("</br>");
      document.write("d값 : " + d);
    }
 
    var paramArr = [1234];
    MyArrayParam.apply(null, paramArr);
</script>
 
  <script type="text/javascript">
    function MyArrayParamECMA6(e, f, g, h)
    {// 신규 문법
      document.write("</br>");
 
      document.write("ECMA6 e값 : " + e);
      document.write("</br>");
      document.write("ECMA6 f값 : " + f);
      document.write("</br>");
      document.write("ECMA6 g값 : " + g);
      document.write("</br>");
      document.write("ECMA6 h값 : " + h);
    }
 
    var paramArr2 = [5678];
    MyArrayParamECMA6(...paramArr2);
</script>
</head>
<body>
</body>
</html>
 
cs

실행




'프로그래밍 > Web' 카테고리의 다른 글

[Web]Tab  (0) 2018.08.26
[JavaScript] 두 날짜 사이 간격 구하기  (0) 2018.08.21
[JavaScript] 기본 매개변수  (0) 2018.08.15
[CSS] 배경 100프로 이미지표시  (0) 2018.08.04
[Jquery]dom 선택자  (0) 2018.08.01
Posted by 유령회사
|