블로그 이미지
Magic_kit
study 관련자료를 한곳으로 자기 개발 목적으로 재태크 재무 관리 목적으로 일상생활의 팁을 공유 하기 위하여 블로그를 개설 하였습니다.

calendar

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
반응형

Category

Recent Post

Recent Comment

Archive

2009. 7. 30. 15:34 .Net Project/JavaScript
반응형



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                                "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   
    <title>07장 기본출력문</title>
    <script type="text/javascript">
        document.write("문서 영역에 대한 결과값 출력<br />");
       
        window.document.write(
             "<span style='color:red;'>window</span> 객체는 생략가능 <br />");
       
        window.alert("\"메시지박스\" 결과 값 출력");
        alert("역시 window 객체(개체)는 생략가능");
     </script>
</head>
<body bgcolor="Lime"> //배경색지정

</body>
</html>



이벤트 처리에 의해서 MessageBox
처리 하고 있으며, 처리 완료 후
배경색 bgcolor="Lime" 변경 완료 처리


반응형
posted by Magic_kit
2009. 7. 30. 14:40 .Net Project/JavaScript
반응형


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                           "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>06.자바스크립트 객체속성 메서드</title>
    
<script language="javascript" type="text/javascript">

        document.write("1. 객체.메서드() <br />"); //() 무조건 함수 메서드
        document.title = "2. 객체.속성"; // title Bar 제목을 출력

</script>
   
</head>
<body bgcolor="#FF8000"> //배경색 지정
//자바에서 사용하지 않는 방식을 묶어서 자바스크립트사용
<!--
click : click 이벤트
onclick : onclick 이벤트 핸들러(처리기)
-->
    <input id="Button1" type="button" value="클릭"
     onclick="window.alert('안녕');" />
</body></html>


 onclick="window.alert 사용하여 MessageBox 이벤트 처리



반응형
posted by Magic_kit
2009. 7. 30. 14:30 .Net Project/JavaScript
반응형



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                        "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>05.자바스크립트 작성시 유의사항</title>
</head>
<body bgcolor="#FF8000"> //배경색 지정
<script language="javascript" type="text/javascript"> //일반적인 방법
   
    document.write("마지막 버전");
   
</script>
<br />
<script language="javascript1.3" type="text/javascript"> //버전을 사용방법

    document.write("1.3 버전");
   
</script>
<br />
//자바스크립트 지원하지 않는 상황에서 주석으로 묶어서 처리 가능
<script language="javascript" type="text/javascript">   
<!--
    document.write("자바스크립트를 알지 못하는 웹브라우저를 위해서");
-->   
</script>

<script language="javascript" type="text/javascript">  //메시지박스 대화 경고상자 출력
//여기에 경고 대화상자를 하나 출력
//메시지박스를 출력하고자 할 때에는 window.alert()명령어를 사용
    window.alert("경고대화상자출력");
</script>
</body>
</html>

window.alert  경고 대화상자 이벤트 핸들러 발생 처리  


<정리>
1. 자바스크립트 선언하여 가장 잘쓰는 일반적인 방법
2. 일반적인 방식에 버젼 추가 하여 사용 하는 방법
3. 자바스크립트 지원하지 않는 상황을 주석으로 묶어서 처리하는 방법
4. 최종적으로 MessageBox 경고 대화상자 출력으로 인해 이벤트 처리


반응형
posted by Magic_kit
2009. 7. 30. 14:19 .Net Project/JavaScript
반응형



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>04장 태그내의 자바스크립트정의</title>
</head>

<input 
     type="button" value="버튼"
     style="background-color:Yellow;border:solid 1px red;"
     onclick="window.alert('잘하셨어요');"
     onmouseover="this.style.backgroundColor='green';"
     onmouseout="this.style.backgroundColor='yellow';"
/>
<body bgcolor="#ffcc99"> //배경색 지정    
</body>
</html>

Mouse Drag&Drop 에 관한 사용 예제)


 onmouseover="this.style.backgroundColor='green';"



  onmouseout="this.style.backgroundColor='yellow';"



onclick="window.alert('잘하셨어요');" 아래와 같은 이벤트 처리 방식으로 인해 사용

반응형
posted by Magic_kit
prev 1 2 3 4 5 next