관리 메뉴

nalaolla

onload 본문

javascript/fundamental

onload

날아올라↗↗ 2016. 1. 7. 13:37
728x90
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Insert title here</title>
  6. <script type="text/javascript">
  7.     window.onload = function() {    //페이지 로드 후 이벤트 진행
  8.  
  9.         var string1 = "This is a ";
  10.         var string2 = "test";
  11.  
  12.         var string3 = string1 + string2; // creates a new string with "This is a test"
  13.  
  14.         alert(string3);
  15.     }
  16. </script>
  17. </head>
  18. <body>
  19.  
  20. </body>
  21. </html>


728x90

'javascript > fundamental' 카테고리의 다른 글

indexOf  (0) 2016.01.07
prompt  (0) 2016.01.07
type  (0) 2016.01.07