1 / 13

자바스크립트 내장 함수

자바스크립트 내장 함수. 자바스크립트 내장 함수. 자바스크립트 내장 함수. 자바스크립트 내장 함수. eval (“1000”);  1000 eval (“100+10”);  110 eval (“ document.objName.value ”);  objName 객체의 value 반환. 자바스크립트 내장 함수. isNaN (“ 테스트 ”);  true isNaN (“ 테스트 123”);  true isNaN (“123”);  false isNaN (123);  false

anevay
Télécharger la présentation

자바스크립트 내장 함수

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 자바스크립트 내장 함수

  2. 자바스크립트 내장 함수

  3. 자바스크립트 내장 함수

  4. 자바스크립트 내장 함수

  5. eval(“1000”);  1000 eval(“100+10”);  110 eval(“document.objName.value”);  objName객체의 value 반환 자바스크립트 내장 함수 isNaN(“테스트”);  true isNaN(“테스트123”);  true isNaN(“123”);  false isNaN(123);  false isNaN(true);  false parseInt(’33’);  33 parseInt(‘33’) + parseInt(‘22.22’);  55

  6. 자바스크립트 내장 함수

  7. alert(“123”); 자바스크립트 내장 함수 confirm(“선택하세요”); prompt(“메세지”, “기본값”);

  8. 자바스크립트 내장 함수 Number : 문자형태의 숫자를 숫자로 변환 Number(“123”) + Number(“3”);  126 String : 숫자를 문자로 변환 String(123) + String(3);  “1233”

  9. String 객체의 속성 및 함수 자바스크립트 내장 함수

  10. Date 객체의 함수 (1/2) 자바스크립트 내장 함수

  11. Date 객체의 함수 (2/2) 자바스크립트 내장 함수

  12. <script> var d = new Date(); var year = d.getFullYear(); var month = d.getMonth() - 1; var date = d.getDate(); var hour = d.getHours(); var minute = d.getMinutes(); var second = d.getSeconds(); alert(year + "년" + month + "월" + date + "일" + hour + "시" + minute + "분" + second + "초"); </script> 자바스크립트 내장 함수

  13. HTML 태그의 이벤트 속성을 이용하여 동적인 함수 실행 <script> function runAlert() { alert(“HTML 태그를 클릭하여 실행”); } </script> <body> <input type=“button” value=“실행” onclick=“runAlert()” /> <input type=“text” onclick=“runAlert()” /> <a href=“” onclick=“runAlert()”>실행</a> <ahref=“javascript:runAlert()”>실행</a> <ahref=“javascript:alert(‘내부 실행’)”>실행</a> <h1onclick=“runAlert()”>실행</h1></body> </body> 자바스크립트 함수 동적 실행

More Related