대화상자1 1.자바스크립트 기초 문법(요소에 접근&대화상자&배열&함수) 1. 인라인 자바스크립트 2. 3. 4. 2. test var s; //변수 선언(자료형이 없음) s = 100; // 가변자료형(우변의 데이터형에 따라 결정) document.write(s+" "); //웹브라우저에 출력 s="홍길동"; document.write(s+" "); 3. 문자 var s = "Hello World" var t = "How are you "+ "today"; //문자열 연결 document.write(s+" "); document.write(t+" "); //대문자로 변환 document.write(s.toUpperCase()+" "); // 소문자로 변환 document.write(s.toLowerCase()+" "); 4. 연산 function test(x,y){ x= p.. 2016. 12. 19. 이전 1 다음