본문 바로가기

HTML27

html 경고창 , 현재 시간 출력 예제 html 예제 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 콜백함수a // 콜백함수 ; 함수를 하나의 자료형처럼 취급 // 즉 함수를 다른 함수의 매개변수로 사용 function send_go() { setTimeout(function() { alert("경고메세지") ; }, 3000); } function send_go2() { var now = new Date(); var s = now.getFullYear()+". " + (now.getMonth()+1)+". "+ now.getDate()+" "+ now.getHours()+" : " + now.getMinutes()+" : "+now... 2017. 12. 6.
html 예제 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 Number Methods //Nan : 숫자가 들어갈 자리에 숫자가 아닌 다른 값이 들어오면 표시 //isNan : Nan 확인 //Number() : 숫자형 문자를 숫자로 바꾼다. 잘못 들어오면 Nan표시 //parseInt : 정수 변환 //parseFloat : 실수 변환 document.write(Number("10")+" ");//10 document.write(Number("10.33")+" ");//10.33 document.write(Number("10 20 30")+" ");//Nan document.write(Number("10 years").. 2017. 12. 6.
html 예제 html 예제 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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 Insert title here document.write(" Math Method "); document.write("2의 10승 : "+Math.pow(2,10)+" "); document.write("3,25,9,47,2,5,7 중 가장 큰 수 : "+Math.max(.. 2017. 12. 6.
p 태그 id에 자바스크립트 결과 담기 p 태그 id에 자바스크립트 결과 담기 코드 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 47 48 49 50 51 52 53 54 55 56 57 Insert title here //객체 생성 var person=new Object(); person["name"]="최은서"; person["age"]="20"; person["salary"]=3200; document.write(person["name"]+" "); document.write(person.age+" "); document.write(person.salar.. 2017. 12. 6.
html 표 추가 삭제 html 표에 행을 추가하고 삭제하기 코드 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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 Insert title here /*아이디 선택자가 #인 것을 지칭*/ #table1{width:70%} #table2{width:50%} table,th,td{border:1px solid black;.. 2017. 12. 6.