<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Binary World</title>
    <link>https://jhmocu.tistory.com/</link>
    <description>이진법으로 구성하는 새로운 세상</description>
    <language>ko</language>
    <pubDate>Sun, 5 Apr 2026 16:44:12 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>모쿠</managingEditor>
    <image>
      <title>Binary World</title>
      <url>https://tistory1.daumcdn.net/tistory/2556539/attach/316d11f679aa49c8a6d9fa73b4c2dfbf</url>
      <link>https://jhmocu.tistory.com</link>
    </image>
    <item>
      <title>유용한 윈도우 단축키 모음집.zip</title>
      <link>https://jhmocu.tistory.com/154</link>
      <description>&lt;p&gt;- 윈도우키 + 숫자키 : 작업 표시줄 프로그램을 숫자 번호대로 실행&lt;/p&gt;
&lt;p&gt;- &lt;span style=&quot;color: #333333;&quot;&gt;윈도우키 + R : 실행창 열기&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #333333;&quot;&gt;- 윈도우키 + E : 탐색기창 열기&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;- 윈도우키 + D : 모든 화면 내리기&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;- 윈도우키 + 방향키 : 현재 프로그램 창 위치 조정&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;- 윈도우키 + TAB : 모든 창 한 번에 보기&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;- 윈도우키 + X : 각종 기능 빠르게 보기&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>개발자의 길/자료</category>
      <category>윈도우 #단축키</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/154</guid>
      <comments>https://jhmocu.tistory.com/154#entry154comment</comments>
      <pubDate>Wed, 6 Jan 2021 10:22:54 +0900</pubDate>
    </item>
    <item>
      <title>클래스와 상속(Classes and Inheritance)</title>
      <link>https://jhmocu.tistory.com/153</link>
      <description>&lt;p&gt;&lt;b&gt;&amp;lt;클래스(Classes)&amp;gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;코틀린에서 클래스는 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;class&lt;/span&gt; 키워드를 사용한다.&amp;nbsp;&lt;/p&gt;
&lt;pre id=&quot;code_1559277458534&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class Invoice {...}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;클래스 선언은 클래스 이름, 클래스 헤더(타입 매개 변수, 기본 생성자 등), 클래스 본문, 괄호로 구성된다. 헤더와 본문은 선택적이다. 클래스가 본문이 없다면 괄호는 제거된다.&lt;/p&gt;
&lt;pre id=&quot;code_1559277648204&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class Empty&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;생성자(Constructors)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;코틀린에서 클래스는 &lt;b&gt;기본 생성자&lt;/b&gt;와 &lt;b&gt;하나 이상&lt;/b&gt;의 보조 생성자를 가질 수 있다. 기본 생성자는 클래스 헤더의 일부다 : 클래스 이름 뒤에 위치.&lt;/p&gt;
&lt;pre id=&quot;code_1559278026482&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class Person constructor(firstName: String) { ... }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;만약 기본 생성자에 특정 어노테이션 또는 접근 제한자가 없으면, &lt;span style=&quot;color: #1b9ae6;&quot;&gt;constructor&lt;/span&gt; 키워드는 제거된다.&amp;nbsp;&lt;/p&gt;
&lt;pre id=&quot;code_1559278260818&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class Person(firstName: String) { ... }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;기본 생성자는 어떤 코드도 포함하지 않는다. 초기화 코드는&amp;nbsp;&lt;b&gt;초기화 블록&lt;/b&gt;에 놓을 수 있고, 이 접두사에는 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;init&lt;/span&gt; 키워드가 붙는다.&lt;/p&gt;
&lt;p&gt;인스턴스 초기화 중에, 초기화 블록이 실행된다. 초기화 블록은 클래스 본문에 나타내는 순서와 동일하게 실행되고, 속성 초기화 값을 인터리브한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559278942633&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class InitOrderDemo(name: String) {
    val firstProperty = &quot;First property: $name&quot;.also(::println)
    
    init {
        println(&quot;First initializer block that prints ${name}&quot;)
    }
    
    val secondProperty = &quot;Second property: ${name.length}&quot;.also(::println)
    
    init {
        println(&quot;Second initializer block that prints ${name.length}&quot;)
    }
}

fun main() {
    InitOrderDemo(&quot;hello&quot;)
}

/* 출력 결과 */
First property: hello
First initializer block that prints hello
Second property: 5
Second initializer block that prints 5&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;기본 생성자의 매개 변수는 초기화 블록에서 사용될 수 있다. 또한, 클래스 본문에 선언된 속성 초기화 변수에 사용될 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559279545489&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class Customer(name: String) {
    val customerKey = name.toUpperCase()
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;사실, 코틀린에서는, 기본 생성자로부터 속성 선언과 초기화를 위해 간결한 문구를 사용할 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559279668015&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class Person(val firstName: String, val lastName: String, var age: Int) { ... }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;정규 속성들과 거의 같은 방식으로, 기본 생성자에서 속성 선언은 var(변수) 또는 val(읽기 전용)으로 한다.&lt;/p&gt;
&lt;p&gt;생성자가 어노테이션 또는 접근 제한자를 갖는다면, &lt;span style=&quot;color: #1b9ae6;&quot;&gt;constructor&lt;/span&gt; 키워드가 필요하다.&lt;/p&gt;
&lt;pre id=&quot;code_1559280049635&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class Customer public @Inject constructor(name: String) { ... }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;보조 생성자(Secondary Constructors)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;contstructor 접두사를 사용하여, 보조 생성자를 선언할 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559280278324&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class Person {
    constructor(parent: Person) {
        parent.children.add(this)
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;클래스가 기본 생성자를 갖는다면, 다른 보조 생성자(들)을 통해 직접 또는 간접적으로, 각 보조 생성자가 기본 생성자에 위임을 해야 한다. 같은 클래스의 다른 생성자로 위임은 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;this&lt;/span&gt; 키워드를 사용한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559280743607&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class Person(val name: String) {
    constructor(name: String, parent: Person) : this(name) {
        parent.children.add(this)
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;초기화 블록의 코드는 효과적으로 기본 생성자의 일부가 된다. 기본 생성자에 대한 위임은 보조 생성자의 첫 번째 상태로 발생하므로, 초기화 블록의 코드는 보조 생성자의 본문보다 먼저 실행된다. 기본 생성자가 없더라도, 위임은 여전히 발생되며, 초기화 블록 역시 실행된다.&lt;/p&gt;
&lt;pre id=&quot;code_1559281228064&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class Constructors {
    init {
        println(&quot;Init block&quot;)
    }

    constructor(i: Int) {
        println(&quot;Constructor&quot;)
    }
}

fun main() {
    Constructors(1)
}

/* 출력 결과 */
Init block
Constructor&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;추상화 클래스가 아닌 클래스가 어떤 생성자도 생성하지 않으면, 매개 변수가 없는 기본 생성자를 생성한다. 생성자의 접근 상태는 public으로 된다. 클래스가 public 생성자를 갖는 것을 원치 않는다면, 기본 접근 제한자 외에 제한자를 갖는 빈 기본 생성자를 선언해야 한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559281644806&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class DontCreateMe private constructor () { ... }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;클래스의 인스턴스 생성(Creating instance of classes)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;클래스의 인스턴스를 생성하기 위해, 정규 함수의 생성자를 호출해 보자.&lt;/p&gt;
&lt;pre id=&quot;code_1559281822753&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val invoice = Invoice()

val customer = Customer(&quot;Joe Smith&quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;참고 : &lt;span style=&quot;color: #1b9ae6;&quot;&gt;new&lt;/span&gt; 키워드를 사용하지 않는다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;클래스 멤버(Class Members)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;클래스는 아래 항목들을 포함한다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;생성자와 초기화 블록&lt;/li&gt;
&lt;li&gt;함수&lt;/li&gt;
&lt;li&gt;속성들&lt;/li&gt;
&lt;li&gt;중복 클래스와 내부 클래스&lt;/li&gt;
&lt;li&gt;객체 선언&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;&amp;lt;상속(Inheritance)&amp;gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;코틀린에서 모든 클래스는 공통의 상위클래스 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;any&lt;/span&gt;를 갖는다. 이것은 상위타입 선언이 되지 않은 기본 슈퍼클래스다.&lt;/p&gt;
&lt;pre id=&quot;code_1559282372834&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class Example // Any로 부터 암묵적인 상속&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;명시적으로 상위 타입을 선언하려면, 클래스 헤더에 콜론을 사용한 후 타입을 명시한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559282594911&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;open class Base(p: Int)

class Derived(p: Int) : Base(p)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;클래스가 기본 생성자를 갖지 않는다면, 각 보조 생성자들은 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;super&lt;/span&gt; 키워드를 사용하여 초기화되거나, 다른 생성자로 위임된다. 서로 다른 보조 생성자들은 기본 타입의 다른 생성자들을 호출할 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559282945507&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class MyView : View {
    constructor(ctx: Context) : super(ctx)

    constructor(ctx: Context, attrs: AttributeSet) : super(ctx, attrs)
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;오버라이딩 메소드(Overriding Methods)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;자바와 다르게, 코틀린은 오버라이드될 멤버와 오버라이드에 명시적 수식어를 요구한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559283199612&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;open class Base {
    open fun v() { ... }
    fun nv() { ... }
}
class Derived() : Base() {
    override fun v() { ... }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;override&lt;/span&gt;로 표시된 멤버는 열린 형태가 된다. 이 멤버는 하위클래스에서도 오버라이드 가능하다. 만약 오버라이딩을 금지하려면 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;final&lt;/span&gt;을 사용한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559283583411&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;open class AnotherDerived() : Base() {
    final override fun v() { ... }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;속성 오버라이딩(Overriding Properties)&lt;/p&gt;
&lt;p&gt;속성 오버라이딩은 메소드 오버라이딩과 비슷하게 작동된다. 파생된 클래스에서 재정의된 상위클래스에서 선언된 속성은 overrride로 우선 적용되어야 하며, 호환 가능한 타입이어야 한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559283969268&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;open class Foo {
    open val x: Int get() { ... }
}

class Bar1 : Foo() {
    override val x: Int = ...
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;var&lt;/span&gt; 속성으로 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;val&lt;/span&gt; 속성을 오버라이드 할 수 있다. val 속성이 기본적으로 getter 메소드를 선언하고, 이를 var로 오버라이드하면 setter 메소드를 추가로 선언하기 때문이다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;참고 : &lt;span style=&quot;color: #1b9ae6;&quot;&gt;override&lt;/span&gt; 키워드는 기본 생성자에서도 사용이 가능하다.&lt;/p&gt;
&lt;pre id=&quot;code_1559284290457&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;interface Foo {
    val count: Int
}

class Bar1(override val count: Int) : Foo

class Bar2 : Foo {
    override var count: Int = 0
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;파생 클래스 초기화 순서(Derived class initialization order)&lt;/p&gt;
&lt;p&gt;파생된 클래스의 새로운 인스턴스의 구성 중에, 기본 클래스 초기화는 첫 단계로 수행된다. 따라서, 파생된 클래스의 초기화 논리가 실행되기 전에 수행된다.&lt;/p&gt;
&lt;pre id=&quot;code_1559285292399&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;open class Base(val name: String) {

    init { println(&quot;Initializing Base&quot;) }

    open val size: Int = 
        name.length.also { println(&quot;Initializing size in Base: $it&quot;) }
}

class Derived(
    name: String,
    val lastName: String
) : Base(name.capitalize().also { println(&quot;Argument for Base: $it&quot;) }) {

    init { println(&quot;Initializing Derived&quot;) }

    override val size: Int =
        (super.size + lastName.length).also { println(&quot;Initializing size in Derived: $it&quot;) }
}

fun main() {
    println(&quot;Constructing Derived(\&quot;hello\&quot;, \&quot;world\&quot;)&quot;)
    val d = Derived(&quot;hello&quot;, &quot;world&quot;)
}

/* 출력 결과 */
Constructing Derived(&quot;hello&quot;, &quot;world&quot;)
Argument for Base: Hello
Initializing Base
Initializing size in Base: 5
Initializing Derived
Initializing size in Derived: 10&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;상위 클래스 구현 호출(Calling the superclass implementation)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;파생 클래스의 코드는 super 키워드를 사용하여 상위 클래스 함수 및 속성 접근자를 구현할 수 있다.&amp;nbsp;&lt;/p&gt;
&lt;pre id=&quot;code_1559285683645&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;open class Foo {
    open fun f() { println(&quot;Foo.f()&quot;) }
    open val x: Int get() = 1
}

class Bar : Foo() {
    override fun f() { 
        super.f()
        println(&quot;Bar.f()&quot;) 
    }
    
    override val x: Int get() = super.x + 1
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;내부 클래스 안에서는, 외부 클래스의 상위 클래스 접근은 외부 클래스 이름으로 지정된 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;super&lt;/span&gt; 키워드를 사용한다: &lt;span style=&quot;background-color: #dddddd;&quot;&gt;super@Outer&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559286088073&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class Bar : Foo() {
    override fun f() { /* ... */ }
    override val x: Int get() = 0
    
    inner class Baz {
        fun g() {
            super@Bar.f() // Foo의 f() 실행 호출
            println(super@Bar.x) // Foo의 x getter 실행 호출
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;오버라이딩 규칙(Overriding Rules)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;다양한 클래스에서 상속 할 때, 멤버 이름이 동일한 경우에는 이 멤버를 재정의하는 방법을 제공한다. 상속된 구현으로부터 상위타입을 나타내려면, 다음과 같은 표현을 사용한다 : super&amp;lt;Base&amp;gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559286977746&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;open class A {
    open fun f() { print(&quot;A&quot;) }
    fun a() { print(&quot;a&quot;) }
}

interface B {
    fun f() { print(&quot;B&quot;) } // 인터페이스 멤버는 open이 기본 상태이다.
    fun b() { print(&quot;b&quot;) }
}

class C() : A(), B {
    // f() 함수 오버라이드가 필요하다.
    override fun f() {
        super&amp;lt;A&amp;gt;.f() // call to A.f()
        super&amp;lt;B&amp;gt;.f() // call to B.f()
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;추상 클래스(Abstract Classes)&lt;/p&gt;
&lt;p&gt;일부 클래스와 멤버들은 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;abstract&lt;/span&gt;로 선언될 수 있다. 추상 멤버는 해당 클래스에 구현되지 않는다.&amp;nbsp;&lt;/p&gt;
&lt;pre id=&quot;code_1559287329552&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;open class Base {
    open fun f() {}
}

abstract class Derived : Base() {
    override abstract fun f()
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>개발자의 길/Kotlin</category>
      <category>코틀린#클래스#상속</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/153</guid>
      <comments>https://jhmocu.tistory.com/153#entry153comment</comments>
      <pubDate>Fri, 31 May 2019 16:33:06 +0900</pubDate>
    </item>
    <item>
      <title>함수(Functions)</title>
      <link>https://jhmocu.tistory.com/152</link>
      <description>&lt;p&gt;&lt;b&gt;함수 선언(Function Declarations)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;fun&lt;/span&gt; 키워드를 사용해서 함수를 선언한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559187650870&quot; class=&quot;kotlin&quot; style=&quot;display: block; overflow: auto; padding: 15px; color: #383a42; background: #f6f7f8; font-size: 14px; border-radius: 3px; font-family: Menlo, Consolas, Monaco, monospace; border: 1px solid #dddddd; margin: 20px auto 0px; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun double(x: Int): Int {
    return 2 * x
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;함수 사용(Function Usage)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;함수 호출은 일반적인 방법을 사용한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559187721345&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val result = double(2)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;멤버 함수 호출은 점(.) 표기법을 사용한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559187849493&quot; class=&quot;kotlin&quot; style=&quot;display: block; overflow: auto; padding: 15px; color: #383a42; background: #f6f7f8; font-size: 14px; border-radius: 3px; font-family: Menlo, Consolas, Monaco, monospace; border: 1px solid #dddddd; margin: 20px auto 0px; cursor: default; z-index: 1; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;Sample().foo() // 클래스의 인스턴스를 생성하고 foo()를 호출&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;매개 변수(Parameters)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;함수 매개 변수 파스칼 표기법(이름 : 타입)을 사용하여 정의된다. 매개 변수는 쉼표(,)를 이용하여 구분된다. 각 매개 변수는 명시적 타입으로 선언되어야 한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559188261810&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun powerOf(number: Int, exponent: Int) { ... }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;기본 인자 값(Default Arguments)&lt;/p&gt;
&lt;p&gt;함수 매개 변수는 기본 값을 가질 수 있고, 인자 값이 생략될 때 사용된다. 다른 언어와 비교해서 과부하를 더 줄일 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559188546011&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun read(b: Array&amp;lt;Byte&amp;gt;, off: Int = 0, len: Int = b.size) { ... }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;기본 값은 '= after 타입'을 사용하여 정의된다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;오버라이딩 메소드는 항상 기초 메소드와 같은 기본 매개 변수 값을 사용한다. 오버라이딩 메소드가 기본 매개 변수 값을 가질 때, 기본 매개 변수 값은 제거된다.&lt;/p&gt;
&lt;pre id=&quot;code_1559189266635&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;open class A {
    open fun foo(i: Int = 10) { ... }
}

class B : A() {
    override fun foo(i: Int) { ... }  // 기본 값을 허용하지 않는다.
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;기본 값이 없는 매개 변수 앞에 기본 값이 있는 매개 변수가 있는 경우, 기본 값은 명명된 매개 변수를 포함한 함수에서만 사용된다.&lt;/p&gt;
&lt;pre id=&quot;code_1559189664183&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun foo(bar: Int = 0, baz: Int) { ... }

foo(baz = 1) // 기본 값 bar = 0이 사용된다.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;기본 매개 변수 뒤에 마지막 매개 변수가 람다 표현식인 경우, 명명된 인자 값 또는 괄호 외부로 전달될 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559190418706&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun foo(bar: Int = 0, baz: Int = 1, qux: () -&amp;gt; Unit) { ... }

foo(1) { println(&quot;hello&quot;) }     // 기본 값 baz = 1 사용
foo(qux = { println(&quot;hello&quot;) }) // 기본 값 bar = 0 와 baz = 1 둘 다 사용 
foo { println(&quot;hello&quot;) }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;명명된 인자 값(Named Arguments)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;함수를 호출할 때, 매개 변수의 이름을 지정할 수 있다. 함수에 많은 수의 매개 변수 또는 기본 매개 변수가 있는 경우 매우 편리하다.&lt;/p&gt;
&lt;pre id=&quot;code_1559190945479&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun reformat(str: String,
             normalizeCase: Boolean = true,
             upperCaseFirstLetter: Boolean = true,
             divideByCamelHumps: Boolean = false,
             wordSeparator: Char = ' ') {
...
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;기본 인자 값을 사용해서 다음과 같이 호출할 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559191004871&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;reformat(str)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;기본 값이 아닌 값으로 호출 할 때, 다음과 같이 사용한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559191356954&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;reformat(str, true, true, false, '_')&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span&gt;명명된 인수를 사용하면 코드를 훨씬 쉽게 읽을 수 있다.&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559191511250&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;reformat(str,
    normalizeCase = true,
    upperCaseFirstLetter = true,
    divideByCamelHumps = false,
    wordSeparator = '_'
)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;일부 인자 값만 사용하는 방법은 다음과 같다.&lt;/p&gt;
&lt;pre id=&quot;code_1559191669040&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;reformat(str, wordSeparator = '_')&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span&gt;호출&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;f(1, y = 2)&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;허용되고, &lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;f(x = 1, 2)는&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt; 허용되지 않는다. 즉, 명명된 인자 값 앞에 위치 인자 값이 있어야 한다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #333333;&quot;&gt;가변 인자(vararg)는 스프레드(spread) 연산자를 사용한 명명된 형식으로 전달될 수 있다.&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559192276390&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun foo(vararg strings: String) { ... }

foo(strings = *arrayOf(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;))&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;참고 : 명명된 인자 값은 자바 함수 호출에서 사용할 수 없다. 자바 바이트 코드는 함수 매개 변수의 이름을 항상 유지하지 않기 때문이다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;단위 반환 함수(Unit-returning functions)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;함수가 유용한 값을 반환하지 않으면, 리턴 타입은 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Unit&lt;/span&gt;이 된다. &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Unit&lt;/span&gt;은 하나의 값만 있는 유형이다. 이 값을 명시적으로 반환할 필요는 없다.&lt;/p&gt;
&lt;pre id=&quot;code_1559193043810&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun printHello(name: String?): Unit {
    if (name != null)
        println(&quot;Hello ${name}&quot;)
    else
        println(&quot;Hi there!&quot;)
    // `return Unit` 또는 `return` 선택이다.
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Unit 리턴 타입 또한 선택이다. 아래 코드는 위와 같다.&lt;/p&gt;
&lt;pre id=&quot;code_1559193109337&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun printHello(name: String?) { ... }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;단일 표현식 함수(Single-Expression functions)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;함수가 단일 표현을 리턴할 때, 중괄호는 생략할 수 있고 본문은 =기호에 저장된다.&amp;nbsp;&lt;/p&gt;
&lt;pre id=&quot;code_1559193509754&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun double(x: Int): Int = x * 2&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;리턴 타입이 컴파일러에 의해 추정되면, 명시적 리턴 타입 선언은 선택이다.&lt;/p&gt;
&lt;pre id=&quot;code_1559193568999&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun double(x: Int) = x * 2&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;명시적 리턴 타입(Explicit return types)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;블록 본문을 갖는 함수는 항상 특정 리턴 타입을 명시해야 한다. 코틀린은 블록 본문이 있는 함수의 반환 형식을 추정하지 않는다. 이러한 함수는 본문에서 복잡한 제어 흐름을 가질 수 있고, 반환 형식이 명확하지 않기 때문이다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;가변 인자(Variable number of arguments : varargs)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;함수의 매개 변수(보통 마지막 매개 변수)는 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;varargs&lt;/span&gt; 수식어로 표시된다.&lt;/p&gt;
&lt;pre id=&quot;code_1559194756520&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun &amp;lt;T&amp;gt; asList(vararg ts: T): List&amp;lt;T&amp;gt; {
    val result = ArrayList&amp;lt;T&amp;gt;()
    for (t in ts) // ts는 배열이다.
        result.add(t)
    return result
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;가변 인자가 함수에 전달되도록 허용된다.&lt;/p&gt;
&lt;pre id=&quot;code_1559195098639&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val list = asList(1, 2, 3)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;함수 내에서 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;T&lt;/span&gt;타입의 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;vararg&lt;/span&gt;-매개 변수는 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;T&lt;/span&gt;의 배열로 볼 수 있다. 위 코드에서, &lt;span style=&quot;background-color: #dddddd;&quot;&gt;ts&lt;/span&gt; 변수는 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Array&amp;lt;out T&amp;gt;&lt;/span&gt; 타입을 갖는다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;오직 하나의 매개 변수만 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;vararg&lt;/span&gt;로 표시될 수 있다. vararg 매개 변수가 목록의 마지막 매개 변수가 아니면, 다음 매개 변수의 값은 명명된 인자 값 구문을 사용하거나, 매개 변수가 함수 타입이거나, 괄호 밖에서 람다 표현식을 통과시킴으로써 전달할 수 있다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;vararg 함수를 호출할 때, 인자를 하나씩 전달할 수 있다. 예) asList(1, 2, 3). 이미 배열이 있고, 그 내용을 함수에 전달하려면, 스프레드 연산자(배열 접두사 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;*&lt;/span&gt;)를 사용한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559195902959&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val a = arrayOf(1, 2, 3)
val list = asList(-1, 0, *a, 4)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;중위 표기법(Infix notation)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;infix 키워드로 표시되는 함수는 중위 표기법 사용으로 호출할 수 있다. (호출을 위해 점과 괄호를 생략)&lt;/p&gt;
&lt;p&gt;중위 표기법은 아래 요구사항을 만족해야 한다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;멤버 함수나 확장 함수이다.&lt;/li&gt;
&lt;li&gt;단일 매개 변수이다.&lt;/li&gt;
&lt;li&gt;매개 변수가 가변 인자(varargs)를 허용하지 않고, 기본 값을 갖지 않는다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre id=&quot;code_1559197293059&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;infix fun Int.shl(x: Int): Int { ... }

// 중위 표기법을 사용한 함수 호출
1 shl 2

// 위와 같은 방법
1.shl(2)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;* 중위 함수의 우선순위&lt;/p&gt;
&lt;p&gt;중위 함수는 산술 연산자, 형 변환, rangeTo 연산자 보다 우선순위가 낮다. 예시는 아래와 같다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;1 shl 2 + 3&lt;span&gt;&amp;nbsp;&lt;/span&gt;and&lt;span&gt;&amp;nbsp;&lt;/span&gt;1 shl (2 + 3)&lt;/li&gt;
&lt;li&gt;0 until n * 2&lt;span&gt;&amp;nbsp;&lt;/span&gt;and&lt;span&gt;&amp;nbsp;&lt;/span&gt;0 until (n * 2)&lt;/li&gt;
&lt;li&gt;xs union ys as Set&amp;lt;*&amp;gt;&amp;nbsp;and&lt;span&gt;&amp;nbsp;&lt;/span&gt;xs union (ys as Set&amp;lt;*&amp;gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;논리 연산자보다는 우선순위가 높다. 예시는 아래와 같다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a &amp;amp;&amp;amp; b xor c&lt;span&gt;&amp;nbsp;&lt;/span&gt;and&lt;span&gt;&amp;nbsp;&lt;/span&gt;a &amp;amp;&amp;amp; (b xor c)&lt;/li&gt;
&lt;li&gt;a xor b in c&lt;span&gt;&amp;nbsp;&lt;/span&gt;and&lt;span&gt;&amp;nbsp;&lt;/span&gt;(a xor b) in c&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;참고 : 중위 함수는 항상 수신자와 매개 변수를 지정해줘야 한다. 중위 표기법을 사용해서 현재 수신자를 메소드를 부를 경우, &lt;span style=&quot;background-color: #dddddd;&quot;&gt;this&lt;/span&gt;를 사용해야 한다. 정규 표현식과는 다르게 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;this&lt;/span&gt;는 제거될 수 없다.&lt;/p&gt;
&lt;pre id=&quot;code_1559198531406&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class MyStringCollection {
    infix fun add(s: String) { ... }
    
    fun build() {
        this add &quot;abc&quot;   // 정확
        add(&quot;abc&quot;)       // 정확
        add &quot;abc&quot;        // 부정확 : 수신자를 명식해야한다.
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;지역 함수(Local Functions)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;코틀린은 지역 함수를 지원한다. 지역 함수는 다른 함수 안에 함수가 들어가는 형태다.&lt;/p&gt;
&lt;pre id=&quot;code_1559198787084&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun dfs(graph: Graph) {
    fun dfs(current: Vertex, visited: Set&amp;lt;Vertex&amp;gt;) {
        if (!visited.add(current)) return
        for (v in current.neighbors)
            dfs(v, visited)
    }

    dfs(graph.vertices[0], HashSet())
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;지역 함수는 외부 함수의 지역 변수(즉, 클로저)에 액세스 할 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559198908598&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun dfs(graph: Graph) {
    val visited = HashSet&amp;lt;Vertex&amp;gt;()
    fun dfs(current: Vertex) {
        if (!visited.add(current)) return
        for (v in current.neighbors)
            dfs(v)
    }

    dfs(graph.vertices[0])
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;멤버 함수(Member Functions)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;멤버 함수는 클래스 또는 객체 내부에 정의되는 함수이다.&lt;/p&gt;
&lt;pre id=&quot;code_1559199068298&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class Sample() {
    fun foo() { print(&quot;Foo&quot;) }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;점 표기법을 사용해서 호출한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559199094557&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;Sample().foo() // Sample 클래스의 인스턴스를 생성하고 foo를 호출&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;제네릭 함수(Generic Functions)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;함수는 함수 이름 앞에 단일 꺽쇠 괄호(&amp;lt;&amp;gt;)를 사용하여 지정된 제네릭 매개 변수를 가질 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559199469104&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun &amp;lt;T&amp;gt; singletonList(item: T): List&amp;lt;T&amp;gt; { ... }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;인라인 함수(Inline Functions)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;- 다른 챕터에서 작성&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;확장 함수(Extension Functions)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;- 다른 챕터에서 작성&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;고차 함수와 람다 함수(Higher-Order Functions and Lambdas)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;- 다른 챕터에서 작성&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>개발자의 길/Kotlin</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/152</guid>
      <comments>https://jhmocu.tistory.com/152#entry152comment</comments>
      <pubDate>Thu, 30 May 2019 16:30:11 +0900</pubDate>
    </item>
    <item>
      <title>리턴과 점프(Returns and Jumps)</title>
      <link>https://jhmocu.tistory.com/151</link>
      <description>&lt;p&gt;코틀린은 세 개의 구조적 점프 표현식이 있다:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;return&lt;/span&gt;. 기본적으로, 가장 인접한 둘러싸인 함수 또는 익명 함수로부터 반환된다.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;break&lt;/span&gt;. 가장 인접한 둘러싸인 반복을 종료한다.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;continue&lt;/span&gt;. 가장 인접한 둘러싸인 반복의 다음 단계를 진행한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;모든 표현식은 더 큰 표현식의 일부로 사용 가능하다.&lt;/p&gt;
&lt;pre id=&quot;code_1559114511018&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val s = person.name ?: return&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Break와 Continue 라벨(Labels)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;코틀린에서 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;label&lt;/span&gt;로 표시되는 표현들이 있다. 레이블은 식별자로 @를 사용한다. 예시: abc@, fooBar@. 표현식에 라벨을 추가하려면, 표현식의 앞에 사용한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559115114050&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;loop@ for (i in 1..100) {
    // ...
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;break&lt;/span&gt; 또는 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;continue&lt;/span&gt;에 라벨을 붙일 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559115214741&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;loop@ for (i in 1..100) {
    for (j in 1..100) {
        if (...) break@loop
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;라벨이 붙여진 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;break&lt;/span&gt;는 loop@가 표시된 곳으로 이동한 후에 실행된다. &lt;span style=&quot;color: #1b9ae6;&quot;&gt;continue&lt;/span&gt;는 해당 루프의 다음 반복으로 진행된다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;라벨에서 리턴(Return at Labels)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;코틀린에서, 함수 리터럴, 지역 함수, 객체 표현식, 함수는 중복될 수 있다. &lt;span style=&quot;color: #1b9ae6;&quot;&gt;return&lt;/span&gt;은 외부 함수에서 반환할 수 있도록 허용한다. 가장 중요한 사용하는 경우는 람다 표현식에서 리턴하는 것이다.&amp;nbsp;&lt;/p&gt;
&lt;pre id=&quot;code_1559116249416&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun foo() {
    listOf(1, 2, 3, 4, 5).forEach {
        if (it == 3) return // foo()의 호출자에 직접적으로 리턴
        print(it)
    }
    println(&quot;this point is unreachable&quot;)
}

fun main() {
    foo()
}

/* 출력 결과 */
12&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;람다 표현식에서 리턴을 하고 싶다면, 아래와 같이 라벨을 붙인다.&lt;/p&gt;
&lt;pre id=&quot;code_1559116524843&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun foo() {
    listOf(1, 2, 3, 4, 5).forEach lit@{
        if (it == 3) return@lit // local return to the caller of the lambda, i.e. the forEach loop
        print(it)
    }
    print(&quot; done with explicit label&quot;)
}

/* 출력 결과 */
1245 done with explicit label&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;람다 표현식 내에 함수를 라벨 이름으로 사용할 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559117051043&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun foo() {
    listOf(1, 2, 3, 4, 5).forEach {
        if (it == 3) return@forEach // local return to the caller of the lambda, i.e. the forEach loop
        print(it)
    }
    print(&quot; done with implicit label&quot;)
}

fun main() {
    foo()
}

/* 출력 결과 */
1245 done with implicit label&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;다음과 같은 방법도 가능하다.&lt;/p&gt;
&lt;pre id=&quot;code_1559117488030&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun foo() {
    run loop@{
        listOf(1, 2, 3, 4, 5).forEach {
            if (it == 3) return@loop // 람다 표현식을 지나서 run 위치에서 리턴
            print(it)
        }
    }
    print(&quot; done with nested loop&quot;)
}

fun main() {
    foo()
}

/* 출력 결과 */
12 done with nested loop&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;값을 리턴할 때, 파서(parser)는 자격이 있는 리턴에 우선권을 부여한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559117793032&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;return@a 1&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&quot;라벨 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;@a&lt;/span&gt;에 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;1&lt;/span&gt;을 리턴&quot;한다는 의미&lt;/p&gt;</description>
      <category>개발자의 길/Kotlin</category>
      <category>kotlin #return #jump</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/151</guid>
      <comments>https://jhmocu.tistory.com/151#entry151comment</comments>
      <pubDate>Wed, 29 May 2019 17:19:17 +0900</pubDate>
    </item>
    <item>
      <title>제어 흐름(Control Flow)</title>
      <link>https://jhmocu.tistory.com/150</link>
      <description>&lt;p&gt;&lt;b&gt;If 표현식&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kotlin에서 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;if&lt;/span&gt;는 표현식이다. 즉, 값을 반환한다. 그러므로 삼중 연산자 (condition? then : else)가 없다. 왜냐하면 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;if&lt;/span&gt;가이 역할을 잘 수행하기 때문이다.&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559045765447&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;// 기존 사용법
var max = a 
if (a &amp;lt; b) max = b

// else를 사용하여 
var max: Int
if (a &amp;gt; b) {
    max = a
} else {
    max = b
}
 
// 표현식으로
val max = if (a &amp;gt; b) a else b&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;if&lt;/span&gt;분기가 블록 일 수 있고, 마지막 표현식이 블록의 값인 경우&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559045888342&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val max = if (a &amp;gt; b) {
    print(&quot;Choose a&quot;)
    a
} else {
    print(&quot;Choose b&quot;)
    b
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;When 표현식&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;when&lt;/span&gt;은 C언어 계열의 스위치 연산자를 대신한다. 가장 간단한 형태로 보면 다음과 같다.&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559046205740&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;when (x) {
    1 -&amp;gt; print(&quot;x == 1&quot;)
    2 -&amp;gt; print(&quot;x == 2&quot;)
    else -&amp;gt; {
        print(&quot;x is neither 1 nor 2&quot;)
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;when&lt;/span&gt;은 분기 조건이 충족될 때까지 모든 분기에 대한 인수 값을 순차적으로 찾는다. &lt;span style=&quot;color: #1b9ae6;&quot;&gt;when&lt;/span&gt;은 표현식이나 명령문으로 사용될 수 있다.&amp;nbsp;&lt;span&gt;표현식으로 사용되면 만족 된 분기의 값이 전체 표현식의 값이 된다. 명령문으로 사용되면 개별 분기의 값은 무시된다.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;다른 분기 조건이 충족되지 않으면 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;else&lt;/span&gt; 분기가 평가된다. &lt;span style=&quot;color: #333333;&quot;&gt;컴파일러가 가능한 모든 경우가 분기 조건으로 덮여 있다는 것을 증명할 수 없다면,&amp;nbsp;&lt;/span&gt;표현식으로 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;when&lt;/span&gt;을 사용하면 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;else&lt;/span&gt; 분기는 필수 조건이다.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;많은 경우가 동일한 방식으로 처리되어야하는 경우, 분기 조건은 쉼표로 결합할 수 있다.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559046803429&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;when (x) {
    0, 1 -&amp;gt; print(&quot;x == 0 or x == 1&quot;)
    else -&amp;gt; print(&quot;otherwise&quot;)
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span&gt;분기 조건으로 임의의 표현식 (상수뿐만 아니라)을 사용할 수 있다.&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559046860660&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;when (x) {
    parseInt(s) -&amp;gt; print(&quot;s encodes x&quot;)
    else -&amp;gt; print(&quot;s does not encode x&quot;)
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span&gt;범위의 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;in&lt;/span&gt; 또는 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;!in&lt;/span&gt; 또는 컬렉션에 존재하는 값을 확인할 수 있다.&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559047160048&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;when (x) {
    in 1..10 -&amp;gt; print(&quot;x is in the range&quot;)
    in validNumbers -&amp;gt; print(&quot;x is valid&quot;)
    !in 10..20 -&amp;gt; print(&quot;x is outside the range&quot;)
    else -&amp;gt; print(&quot;none of the above&quot;)
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span&gt;is 또는 !is를 이용하여 값이 특정 유형인지 확인이 가능하다. 스마트 캐스트(Smart cast) 덕분에, 추가 검사 없이 타입의 메소드 및 속성에 접근할 수 있다.&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559047387641&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun hasPrefix(x: Any) = when(x) {
    is String -&amp;gt; x.startsWith(&quot;prefix&quot;)
    else -&amp;gt; false
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;when&lt;/span&gt;은 if-else 체인의 대체용으로도 사용할 수 있다. 인수 값이 제공되지 않으면 분기 조건은 단순히 논리식이 되고, 조건이 참일 때 분기가 실행된다.&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559047554644&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;when {
    x.isOdd() -&amp;gt; print(&quot;x is odd&quot;)
    x.isEven() -&amp;gt; print(&quot;x is even&quot;)
    else -&amp;gt; print(&quot;x is funny&quot;)
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span&gt;Kotlin 1.3 이후, 다음과 같은 구문을 사용하여 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;when&lt;/span&gt;의 주체 변수를 얻을 수 있다.&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559047850533&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun Request.getBody() =
        when (val response = executeRequest()) {
            is Success -&amp;gt; response.body
            is HttpError -&amp;gt; throw HttpException(response.status)
        }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;변수의 범위에서, &lt;span style=&quot;color: #1b9ae6;&quot;&gt;when&lt;/span&gt;의 주체는 when 몸체로 제한된다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;For 반복&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;for&lt;/span&gt; 반복은 반복자를 제공하는 모든 것을 반복한다. 이것은 C# 같은 언어의 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;foreach&lt;/span&gt; 루프와 동일하다. 구문은 다음과 같다.&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559048155478&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;for (item in collection) print(item)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;몸체는 블록화 될 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559048218634&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;for (item: Int in ints) {
    // ...
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;앞서 언급했듯이, for는 반복자를 제공하는 모든 것들을 통해 반복된다. 아래 예시가 있다.&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;iterator() 멤버 또는 확장 함수를 갖고 있고&lt;span style=&quot;color: #333333;&quot;&gt;, 이는 리턴 타입이 존재&lt;/span&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;next() 멤버 또는 확장 함수를 갖고 있고,&lt;/li&gt;
&lt;li&gt;부울을 리턴하는 hasNext()&lt;span&gt;&amp;nbsp;멤버 또는 확장 함수를 갖고 있다.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;위의 세 가지 함수는 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;operator&lt;/span&gt;로 표시되어야 한다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;범위 표현을 사용하여, 숫자의 범위 내에 반복하기:&lt;/p&gt;
&lt;pre id=&quot;code_1559048625084&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    for (i in 1..3) {
        println(i)
    }
    for (i in 6 downTo 0 step 2) {
        println(i)
    }
}

/* 출력 결과 */
1
2
3
6
4
2
0&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;범위 또는 배열에 대한 for 반복은 반복자 객체를 만들지 않는 인덱스 기반 반복으로 컴파일된다.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;인덱스가 있는 배열이나 목록을 반복 할 경우 다음과 같이 할 수 있다.:&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559048883533&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
val array = arrayOf(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)
    for (i in array.indices) {
        println(array[i])
    }
}

/* 출력 결과 */
a
b
c&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;또는, withIndex 라이브러리 함수를 사용할 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559049016365&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val array = arrayOf(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)
    for ((index, value) in array.withIndex()) {
        println(&quot;the element at $index is $value&quot;)
    }
}

/* 출력 결과 */
the element at 0 is a
the element at 1 is b
the element at 2 is c&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;While 반복&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span&gt;&amp;nbsp;과&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;do..while&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span&gt;&amp;nbsp;다른 언어와 같이 동작한다.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559049077478&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;while (x &amp;gt; 0) {
    x--
}

do {
    val y = retrieveData()
} while (y != null) // y는 여기서 보인다!&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>개발자의 길/Kotlin</category>
      <category>Kotlin#코틀린#제어흐름</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/150</guid>
      <comments>https://jhmocu.tistory.com/150#entry150comment</comments>
      <pubDate>Tue, 28 May 2019 22:12:19 +0900</pubDate>
    </item>
    <item>
      <title>패키지와 임포트(Packages and Imports)</title>
      <link>https://jhmocu.tistory.com/149</link>
      <description>&lt;p&gt;&lt;b&gt;패키지(Packages)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;소스 파일은 패키지 선언으로 시작할 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559042464675&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;package foo.bar

fun baz() { ... }
class Goo { ... }

// ...&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;소스 파일의 모든 내용들(클래스와 함수 같은)은 선언된 패키지에 포함된다. 따라서, 위의 예제에서 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;baz()&lt;/span&gt;의 전체 이름은 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;foo.bar.baz&lt;/span&gt;이고, &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Goo()&lt;/span&gt;의 전체 이름은 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;foo.bar.Goo&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;패키지가 명시되지 않았다면, 파일의 내용들은 &quot;default&quot; 패키지에 속해있는 것이다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;디폴트 임포트(Default Import)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;다수의 패키지가 모든 코틀린 파일에 기본적으로 포함되어 있다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;kotlin.*&lt;/li&gt;
&lt;li&gt;kotlin.annotation.*&lt;/li&gt;
&lt;li&gt;kotlin.collections.*&lt;/li&gt;
&lt;li&gt;kotlin.comparisons.*&lt;span&gt;&amp;nbsp;&lt;/span&gt;(since 1.1)&lt;/li&gt;
&lt;li&gt;kotlin.io.*&lt;/li&gt;
&lt;li&gt;kotlin.ranges.*&lt;/li&gt;
&lt;li&gt;kotlin.sequences.*&lt;/li&gt;
&lt;li&gt;kotlin.text.*&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;추가적인 패키지는 타깃 플랫폼에 따라 임포트 한다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;VM:
&lt;ul&gt;
&lt;li&gt;java.lang.*&lt;/li&gt;
&lt;li&gt;kotlin.jvm.*&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;JS:
&lt;ul&gt;
&lt;li&gt;kotlin.js.*&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;임포트(Imports)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;디폴트 임포트와 별개로, 각 파일들은 자신의 임포트 경로를 갖고 있다. 임포트를 위한 구문은 문법에서 표현된다.&lt;/p&gt;
&lt;p&gt;단일 이름으로 임포트 하거나,&lt;/p&gt;
&lt;pre id=&quot;code_1559043415661&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;import foo.Bar // Bar는 현재 자격에 상관없이 모두 접근 가능&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;범위의 모든 접근 가능한 내용&lt;span style=&quot;color: #333333;&quot;&gt;(package, class, object etc)&lt;/span&gt;을 임포트 할 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559043489139&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;import foo.* // 'foo'에 모든 것들을 접근 가능&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;이름이 충돌한다면, &lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;as&lt;/span&gt; 키워드를 이용해&amp;nbsp;&lt;/span&gt;지역 내에 새로 이름을 생성하여 모호성을 제거한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559043722675&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;import foo.Bar // Bar는 접근 가능
import bar.Bar as bBar // bBar는 'bar.Bar'를 나타냄&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;import&lt;/span&gt; 키워드는 클래스 임포트만 국한되지 않는다. 다른 선언을 가져오는데도 사용 가능하다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;최상위 함수와 속성들;&lt;/li&gt;
&lt;li&gt;객체 선언에서 선언된 함수와 속성들;&lt;/li&gt;
&lt;li&gt;enum 상수.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;자바와 다르게, 코틀린은 별도의 &quot;import static&quot; 구문을 갖고 있지 않다. 모든 선언들은 정규 import 키워드를 사용하여 임포트 된다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;최상위 선언의 가시성(Visibility of Top-Level Declarations)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;최상위 선언이 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;private&lt;/span&gt;로 표시되면, 선언된 파일은 비공개가 된다.&amp;nbsp;&lt;/p&gt;</description>
      <category>개발자의 길/Kotlin</category>
      <category>Kotlin#코틀린#Pacakges#Import</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/149</guid>
      <comments>https://jhmocu.tistory.com/149#entry149comment</comments>
      <pubDate>Tue, 28 May 2019 20:50:44 +0900</pubDate>
    </item>
    <item>
      <title>기본 타입(Basic Type)</title>
      <link>https://jhmocu.tistory.com/148</link>
      <description>&lt;p&gt;코틀린에서 모든 것은 객체다. 변수에 대한 멤버 함수와 호출할 수 있다는 의미에서 모든 것은 객체다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;일부 유형은 특수한 내부 표현을 할 수 있다. 예를 들어, 숫자, 문자, 논리(boolean)는 런타임에서 기본 값(primitive value)으로 나타낼 수 있다. 하지만, 사용자에게는 보통의 클래스로 보인다.&amp;nbsp;&lt;span&gt;이 섹션에서는 숫자, 문자, 부울, 배열 및 문자열과 같은 Kotlin에서 사용되는 기본 유형을 설명한다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span&gt;숫자(Numbers)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;코틀린에서 숫자는 자바와 유사하게 다뤄지지만, 완벽히 같지는 않다. 예를 들어, 숫자에 대한 암묵적인 확장 변환이 없고, 상수가 같은 케이스에서 약간 다르다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;코틀린은 다음과 같은 타입 표현을 갖는다.(자바랑 같음):&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;border-collapse: collapse; width: 28.9872%; height: 254px;&quot; border=&quot;1&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span style=&quot;color: #333333;&quot;&gt;Type&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;color: #333333;&quot;&gt;Bit width&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Double&lt;/td&gt;
&lt;td&gt;64&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Float&lt;/td&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Long&lt;/td&gt;
&lt;td&gt;64&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Int&lt;/td&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Short&lt;/td&gt;
&lt;td&gt;16&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Byte&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;span&gt;참고) 코틀린에서 문자는 숫자가 아니다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span&gt;리터럴 상수(Literal Constants)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;리터럴은 자료를 알 수 있는 표기 형식을 말한다. 아래는 정수 값에 대한 리터럴 상수의 종류다:&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;십진법:&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;123&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;Long타입은 끝에 문자&lt;span style=&quot;background-color: #dddddd;&quot;&gt;L&lt;/span&gt;을 붙임&lt;span&gt;&amp;nbsp;&lt;/span&gt;:&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;123L&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;16진법:&lt;span&gt;&amp;nbsp;0x0F&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Binaries:&lt;span&gt;&amp;nbsp;0b00001011&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;참고: 8진법은 지원하지 않음.&lt;/p&gt;
&lt;p&gt;부동 소수점을 위한 기존 표기법도 지원한다:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Doubles by default:&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;123.5&lt;/span&gt;,&lt;span&gt;&amp;nbsp;123.5e10&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Floats은 끝에 문자 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;f&lt;/span&gt;&lt;span&gt;&amp;nbsp;또는&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;F&lt;/span&gt;를 붙임:&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;123.5f&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;숫자 리터럴에서 밑줄(Underscore)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;밑줄을 사용하여 숫자 상수를 더 쉽게 읽을 수 있다.:&lt;/p&gt;
&lt;pre id=&quot;code_1559022599450&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val oneMillion = 1_000_000
val creditCardNumber = 1234_5678_9012_3456L
val socialSecurityNumber = 999_99_9999L
val hexBytes = 0xFF_EC_DE_5E
val bytes = 0b11010010_01101001_10010100_10010010&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;표현법(&lt;span&gt;Representation&lt;/span&gt;)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;자바 플랫폼에서, &lt;span style=&quot;color: #333333;&quot;&gt;null 가능한 정수 참조 (예 :&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;Int?&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;)가 필요하지 않거나, generics이 포함되지 않는다면,&amp;nbsp;&lt;/span&gt;숫자는 JVM 기본 타입으로 물리적으로 저장된다.&amp;nbsp;&lt;span&gt;&amp;nbsp;후자의 경우, 숫자는 박싱 된다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;박싱 된 숫자는 특징을 보존할 필요가 없음을 참고:&lt;/p&gt;
&lt;pre id=&quot;code_1559023660618&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val a: Int = 10000
    println(a === a) 
    val boxedA: Int? = a
    val anotherBoxedA: Int? = a
    println(boxedA === anotherBoxedA)
}

/* 출력 */
true
false&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;반면에, 아래 표현은 같음을 표기한다.:&lt;/p&gt;
&lt;pre id=&quot;code_1559023929884&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val a: Int = 10000
    println(a === a) // 'true' 출력
    val boxedA: Int? = a
    val anotherBoxedA: Int? = a
    println(boxedA === anotherBoxedA) // 'false' 출력
}

/* 출력 결과 */
true
true&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;명시적 전환(Explicit Conversions)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;서로 다른 표현법 때문에, 작은 타입은 큰 타입의 서브타입이 아니다.:&lt;/p&gt;
&lt;pre id=&quot;code_1559024157243&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;// 가상의 코드. 실제로 컴파일 하지 않음:
val a: Int? = 1 // 박싱된 Int (java.lang.Integer)
val b: Long? = a // 명시적 형변환 산출. 박싱된 Long (java.lang.Long)
print(b == a) // 이 출력은 &quot;false&quot;가 된다. Integer와 Long은 갖지 않다.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;결과적으로, 더 작은 타입을 더 큰 타입으로 암묵적으로 변경할 수 없다. 즉, 명시적 변환 없이 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Int&lt;/span&gt; 변수에 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Byte&lt;/span&gt; 타입의 값을 할당할 수 없다.&amp;nbsp;&lt;/p&gt;
&lt;pre id=&quot;code_1559024544762&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val b: Byte = 1 // 리터럴 상수 체크됨
    val i: Int = b // 에러
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;숫자를 확장하기 위해 명시적 형 변환을 사용 가능하다.&lt;/p&gt;
&lt;pre id=&quot;code_1559024636042&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val b: Byte = 1
    val i: Int = b.toInt() // 명식적으로 확대되었기 때문에 가능
    print(i)
}

/* 출력 결과 */
1&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;모든 숫자 타입은 아래 변환을 지원한다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;toByte(): &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Byte&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;toShort(): &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Short&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;toInt(): &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Int&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;toLong(): &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Long&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;toFloat(): &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Float&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;toDouble(): &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Double&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;toChar(): &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Char&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;암시적 변환은 문맥상에서 유추된 타입으로 인해 자동으로 실행되고, 적절한 변환을 위한 산술적 연산이 오버로드 된다.:&lt;/p&gt;
&lt;pre id=&quot;code_1559024836188&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val l = 1L + 3 // Long + Int =&amp;gt; Long&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;연산(Operations)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;코틀린은 숫자에 대한 산술적 연산자 표준 세트를 지원한다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;비트 연산의 경우, 특별한 문자가 제공되진 않는다. 그러나, infix form이라 불리는 명명된 함수를 사용할 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559025295048&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val x = (1 shl 2) and 0x000FF000&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;비트 연산 종류는 아래와 같다.(&lt;span style=&quot;background-color: #dddddd;&quot;&gt;Int&lt;/span&gt;와 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Long&lt;/span&gt;만 사용 가능)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;shl(bits)&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&amp;ndash; 왼쪽으로 비트 이동 (Java's&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;shr(bits)&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&amp;ndash; 오른쪽으로 비트 이동 (Java's&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;ushr(bits)&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&amp;ndash; 양수(unsigned) 오른쪽으로 비트 이동 (Java's&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;and(bits)&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&amp;ndash; 비트 단위 and&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;or(bits)&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&amp;ndash; 비트 단위 or&lt;/li&gt;
&lt;li&gt;xor(bits)&lt;span&gt;&amp;nbsp;&lt;/span&gt;&amp;ndash; 비트 단위 xor&lt;/li&gt;
&lt;li&gt;inv()&lt;span&gt;&amp;nbsp;&lt;/span&gt;&amp;ndash; 비트 단위 inversion(반전)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;부동 소수점 숫자 비교&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;부동 소수점 비교 연산은 다음과 같다.:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;대등 체크:&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;a == b&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;a != b&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;비교 연산자:&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;a &amp;lt; b&lt;/span&gt;,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;a &amp;gt; b&lt;/span&gt;,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;a &amp;lt;= b&lt;/span&gt;,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;a &amp;gt;= b&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;범위 인스턴스화 및 범위 체크:&lt;span&gt;&amp;nbsp;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;a..b&lt;/span&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;x in a..b&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;x !in a..b&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;피연산자가 정적 &lt;span style=&quot;color: #333333;&quot;&gt;부동 소수점 숫자&amp;nbsp;&lt;/span&gt;타입으로 선언되지 않은 경우(e.g &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Any&lt;/span&gt;, &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Comparable&amp;lt;...&amp;gt;&lt;/span&gt;), &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Float&lt;/span&gt; 및 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Double&lt;/span&gt;에 대해, 표준에 동의하지 않은&amp;nbsp;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;equals&lt;/span&gt; 와 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;compareTo&lt;/span&gt; 구현을 사용한다. 따라서 아래와 같은 함수를 사용한다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;NaN&lt;/span&gt;은 스스로 동일한 것으로 간주된다.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;NaN&lt;/span&gt;&lt;span&gt;&amp;nbsp;은&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;POSITIVE_INFINITY&lt;/span&gt;을 포함한 어느 요소보다 큰 값으로 간주된다.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;-0.0&lt;/span&gt;은&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;0.0&lt;/span&gt;보다 작은 것으로 간주된다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;문자(Characters)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;문자는 Char 타입으로 표현된다. 숫자로 직접 대치할 수 없다.&lt;/p&gt;
&lt;pre id=&quot;code_1559027384897&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun check(c: Char) {
    if (c == 1) { // 양립할 수 없는 타입들
        // ...
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;문자 리터럴은 작은따옴표로 구성된다: &lt;span style=&quot;background-color: #dddddd;&quot;&gt;'1'.&lt;/span&gt;&amp;nbsp;특수 문자는 백슬래쉬(\)를 이용해서 표현한다.&lt;/p&gt;
&lt;p&gt;아래의 Escape sequence가 지원된다.:&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;\t&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;\b&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;\r&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;\'&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;\&quot;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;\$&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;다른 문자로 인코딩하기 위해선 유니코드 Escape sequence를 사용한다.:&amp;nbsp;&lt;span style=&quot;color: #333333; background-color: #dddddd;&quot;&gt;'\uFF00'&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;문자를 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Int&lt;/span&gt; 숫자로 변경할 수 있다.:&lt;/p&gt;
&lt;pre id=&quot;code_1559028076394&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun decimalDigitValue(c: Char): Int {
    if (c !in '0'..'9')
        throw IllegalArgumentException(&quot;Out of range&quot;)
    return c.toInt() - '0'.toInt() // 숫자에 대한 명시적 변환
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;숫자와 마찬가지로, Null 가능 참조가 필요할 때, 문자가 박싱 된다. 원형태는 박싱 연산에 의해 보호받지 못한다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;부울(Boolean)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Boolean 타입은 논리를 나타내고, 두 개의 값을 갖는다: &lt;span style=&quot;color: #1b9ae6;&quot;&gt;true&lt;/span&gt;, &lt;span style=&quot;color: #1b9ae6;&quot;&gt;false&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Null 가능 참조가 필요하면 박싱된다.&lt;/p&gt;
&lt;p&gt;아래와 같은 빌트인(Built-in) 연산이 포함&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;||&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&amp;ndash; 둘 중 하나만 참이면 참&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&amp;ndash; 둘 다 참일 때 참&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;!&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- 부정&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;배열(Arrays)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;코틀린에서 배열은 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Array&lt;/span&gt; 클래스로 표현된다. &lt;span style=&quot;background-color: #dddddd;&quot;&gt;get&lt;/span&gt;과 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;set&lt;/span&gt; 함수(연산자 오버로딩 변환으로 인해 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;[]&lt;/span&gt;로 변경된)와 size 속성 등, 유용한 멤버 함수를 갖고있다.:&lt;/p&gt;
&lt;pre id=&quot;code_1559029059568&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;class Array&amp;lt;T&amp;gt; private constructor() {
    val size: Int
    operator fun get(index: Int): T
    operator fun set(index: Int, value: T): Unit

    operator fun iterator(): Iterator&amp;lt;T&amp;gt;
    // ...
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;배열을 만들기 위해, &lt;span style=&quot;background-color: #dddddd;&quot;&gt;arrayOf()&lt;/span&gt; 함수를 사용한다. &lt;span style=&quot;background-color: #dddddd;&quot;&gt;arrayOf(1, 2, 3)&lt;/span&gt;으로 생성하면 배열 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;[1, 2, 3]&lt;/span&gt;이 생성된다.&amp;nbsp;&lt;span style=&quot;color: #333333;&quot;&gt;arrayOfNulls()은 null 요소들로 채워진 배열을 생성할 수 있다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #333333;&quot;&gt;배열 크기를 얻는 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Array&lt;/span&gt; 생성자를 이용할 수 있다. 또한, 인덱스를 가지는 각 배열 요소들의 초기 값을 리턴하는 함수를 이용할 수 있다.:&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559030291799&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    // [&quot;0&quot;, &quot;1&quot;, &quot;4&quot;, &quot;9&quot;, &quot;16&quot;]을 요소로 갖는 문자열 배열 생성
    val asc = Array(5) { i -&amp;gt; (i * i).toString() }
    asc.forEach { println(it) }
}

/* 출력 결과 */
0
1
4
9
16&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style=&quot;color: #333333;&quot;&gt;위에서 언급했듯이, &lt;span style=&quot;background-color: #dddddd;&quot;&gt;[]&lt;/span&gt; 연산자는 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;get()&lt;/span&gt;과 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;set()&lt;/span&gt; 멤버 함수에 대한 호출을 의미한다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #333333;&quot;&gt;참고 : 자바와 다르게, 코틀린에서 배열은 불변이다. 이것은 코틀린이 가능한 런타임 에러들을 방지하기 위해, Array &amp;lt;String&amp;gt;에서 Array &amp;lt;Any&amp;gt;로 할당할 수 없다는 의미이다.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #333333;&quot;&gt;코틀린은 박싱 오버헤드가 없는 기본 타입 배열을 표현하는 특별한 클래스가 존재한다.&amp;nbsp;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;ByteArray&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;ShortArray&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;IntArray&lt;/span&gt; 기타 등등이다. 이 클래스들은 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;Array&lt;/span&gt; 클래스와 상속관계는 없지만, 메서드와 속성들은 동일하다. 또한, 각각에 상응하는 팩토리 함수를 갖고 있다.:&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559031402931&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val x: IntArray = intArrayOf(1, 2, 3)
x[0] = x[1] + x[2]&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;부호 없는 정수(Unsigned Integer)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;코틀린은 다음과 같은 Unsigned 타입을 제공한다.:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;kotlin.UByte&lt;/span&gt;: Unsigned 8-bit 정수, 0 ~ 255 범위&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;kotlin.UShort&lt;/span&gt;: Unsigned 16-bit 정수, 0 ~ 65535 범위&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;kotlin.UInt&lt;/span&gt;: Unsigned 32-bit 정수, 0 ~ 2^32 - 1 범위&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;kotlin.ULong&lt;/span&gt;: Unsigned 64-bit 정수, 0 to 2^64 - 1 범위&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;특별한 클래스(Specialized classes)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;기본 타입과 마찬가지로, Unsigned 타입도 배열 표현에 상응하는 타입이 존재한다.:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;kotlin.UByteArray&lt;/span&gt;: unsigned bytes 배열&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;kotlin.UShortArray&lt;/span&gt;: unsigned shorts 배열&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;kotlin.UIntArray&lt;/span&gt;: unsigned ints 배열&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;kotlin.ULongArray&lt;/span&gt;: unsigned longs 배열&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;리터럴(Literals)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Unsigned 정수를 사용하기 쉽게 하기 위해, 정수 리터럴에 특정 Unsigned 타입을 나타내는 접미사로 태그를 지정하는 기능을 제공한다.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;접미사 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;u&lt;/span&gt; 와 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;U&lt;/span&gt;는 unsigned 태그 리터럴이다. 정확한 타입은 예상 타입에 의해 결정된다. 만약 예상 유형이 제공되지 않는다면,&amp;nbsp; &lt;span style=&quot;background-color: #dddddd;&quot;&gt;UInt&lt;/span&gt; or &lt;span style=&quot;background-color: #dddddd;&quot;&gt;ULong&lt;/span&gt;은 리터럴 크기에 따라 결정된다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre id=&quot;code_1559032990193&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val b: UByte = 1u  // UByte, 예상 타입 제공
val s: UShort = 1u // UShort, 예상 타입 제공
val l: ULong = 1u  // ULong, 예상 타입 제공

val a1 = 42u // UInt: 예상 타입 제공안됨, UInt로 맞춰짐
val a2 = 0xFFFF_FFFF_FFFFu // ULong: 예상 타입 제공안됨, UInt에 맞출 수 없음&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;문자열(Strings)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;문자열은 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;String&lt;/span&gt; 타입으로 표현된다. 문자열은 불변성을 지닌다. 문자열 요소들은 인덱스 연산으로 접근할 수 있는 문자들이다: &lt;span style=&quot;background-color: #dddddd;&quot;&gt;s[i]&lt;/span&gt;. 문자열은 &lt;span style=&quot;color: #1b9ae6;&quot;&gt;for&lt;/span&gt;-loop로 반복할 수 있다.&lt;/p&gt;
&lt;pre id=&quot;code_1559033353036&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
val str = &quot;abcd&quot;
    for (c in str) {
        println(c)
    }
}

/* 출력 결과 */
a
b
c
d&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;+&lt;/span&gt; 연산자를 사용해서 문자열을 연결할 수 있다. 문자열에 다른 타입을 연결하기 위해서는, 첫 번째 요소가 문자열로 표현되어야 한다.:&lt;/p&gt;
&lt;pre id=&quot;code_1559033464412&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val s = &quot;abc&quot; + 1
    println(s + &quot;def&quot;)
}

/* 출력 결과 */
abc1def&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;문자열 리터럴(String Literals)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;문자열 리터럴은 두 가지 유형이 있음:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Escaped 문자열은 escaped 문자를 포함한 문자열이고, raw 문자열은 개행 문자와 임의의 문자를 포함할 수 있는 문자열이다. Escaped 문자열은 자바와 매우 흡사하다.&lt;/p&gt;
&lt;pre id=&quot;code_1559033851274&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val s = &quot;Hello, world!\n&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Escaping은 백 슬러쉬(\)를 사용하여 쉽게 사용 가능하다.&lt;/p&gt;
&lt;p&gt;raw 문자열은 삼 따옴표(&quot;&quot;&quot;)를 사용하는 것으로 정해진다. 개행 등 다른 escaping 문자들은 포함되지 않아야 한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559033988374&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val text = &quot;&quot;&quot;
    for (c in &quot;foo&quot;)
        print(c)
&quot;&quot;&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;trimMargin() 함수를 이용하여 공백을 제거&lt;/p&gt;
&lt;pre id=&quot;code_1559034002156&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val text = &quot;&quot;&quot;
    |Tell me and I forget.
    |Teach me and I remember.
    |Involve me and I learn.
    |(Benjamin Franklin)
    &quot;&quot;&quot;.trimMargin()&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;문자열 템플릿(String Templates)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;문자열은 템플릿 표현을 포함할 수 있다. 템플릿 표현은 달러 모양($)으로 시작하고 변수 이름으로 구성된다.:&lt;/p&gt;
&lt;pre id=&quot;code_1559034227794&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val i = 10
    println(&quot;i = $i&quot;) 
}

/* 출력 결과 */
i = 10&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;중괄호 안에 임의의 표현도 가능:&lt;/p&gt;
&lt;pre id=&quot;code_1559034342286&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val s = &quot;abc&quot;
    println(&quot;$s.length is ${s.length}&quot;) 
}

/* 출력 결과 */
&quot;abc.length is 3&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;템플릿은 raw 문자열과 escaped 문자열을 동시에 지원한다. 리터럴 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;$&lt;/span&gt; 문자를 raw 문자열에 포함한다면, 아래와 같이 표현한다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre id=&quot;code_1559034394674&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val price = &quot;&quot;&quot;
${'$'}9.99
&quot;&quot;&quot;&lt;/code&gt;&lt;/pre&gt;</description>
      <category>개발자의 길/Kotlin</category>
      <category>Kotlin#코틀린#기본타입</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/148</guid>
      <comments>https://jhmocu.tistory.com/148#entry148comment</comments>
      <pubDate>Tue, 28 May 2019 18:09:31 +0900</pubDate>
    </item>
    <item>
      <title>기본 구문(Basic Syntax)</title>
      <link>https://jhmocu.tistory.com/147</link>
      <description>&lt;p&gt;&lt;b&gt;패키지 정의(Defining&amp;nbsp;packages)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;패키지 명시는 가장 위에 줄에 해야한다.&lt;/p&gt;
&lt;pre id=&quot;code_1559014883563&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;package my.demo

import java.util.*

// ...&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;함수 정의(Defining&amp;nbsp;functions)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;Int&lt;/span&gt;를 리턴 타입으로 갖는 'Int' 매개 변수 값이 두 개인 함수:&lt;/p&gt;
&lt;pre id=&quot;code_1559014963661&quot; class=&quot;java&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun sum(a: Int, b: Int): Int {
    return a + b
}

fun main() {
    print(&quot;sum of 3 and 5 is &quot;)
    println(sum(3, 5))
}

/* 출력 결과 */
sum of 3 and 5 is 8&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;표현식 본문과 유추된 리턴 타입을 갖는 함수:&lt;/p&gt;
&lt;pre id=&quot;code_1559015036341&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun sum(a: Int, b: Int) = a + b

fun main() {
    println(&quot;sum of 19 and 23 is ${sum(19, 23)}&quot;)
}

/* 출력 결과 */
sum of 19 and 23 is 42&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;의미없는 값(void)을 리턴하는 함수:&lt;/p&gt;
&lt;pre id=&quot;code_1559015083001&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun printSum(a: Int, b: Int): Unit {
    println(&quot;sum of $a and $b is ${a + b}&quot;)
}

fun main() {
    printSum(-1, 8)
}

/* 출력 결과 */
sum of -1 and 8 is 7&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style=&quot;background-color: #dddddd;&quot;&gt;Unit&lt;/span&gt; 리턴 타입은 생략이 가능:&lt;/p&gt;
&lt;pre id=&quot;code_1559015163467&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun printSum(a: Int, b: Int) {
    println(&quot;sum of $a and $b is ${a + b}&quot;)
}

fun main() {
    printSum(-1, 8)
}

/* 출력 결과 */
sum of -1 and 8 is 7&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;변수 정의(Defining&amp;nbsp;variables)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;읽기 전용 지역변수는 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;val&lt;/span&gt; 키워드를 사용해서 정의된다.:&lt;/p&gt;
&lt;pre id=&quot;code_1559015479654&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val a: Int = 1  // 즉시 할당
    val b = 2   // `Int` 타입으로 추론됨
    val c: Int  // 초기화자(initializer)가 없을 때 요구되는 타입이 제공됨
    c = 3       // 후에 할당
    println(&quot;a = $a, b = $b, c = $c&quot;)
}

/* 출력 결과 */
a = 1, b = 2, c = 3&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;변수는 &lt;span style=&quot;background-color: #dddddd;&quot;&gt;var&lt;/span&gt; 키워드를 사용해서 정의된다.:&lt;/p&gt;
&lt;pre id=&quot;code_1559015540167&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    var x = 5 // `Int` 타입이 추론됨
    x += 1
    println(&quot;x = $x&quot;)
}

/* 출력 결과 */
x = 6&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;최상위 변수들&lt;/p&gt;
&lt;pre id=&quot;code_1559015579445&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val PI = 3.14 // 전역 읽기 전용 변수
var x = 0 // 전역 변수

fun incrementX() { 
    x += 1 
}

fun main() {
    println(&quot;x = $x; PI = $PI&quot;)
    incrementX()
    println(&quot;incrementX()&quot;)
    println(&quot;x = $x; PI = $PI&quot;)
}

/* 출력 결과 */
x = 0; PI = 3.14
incrementX()
x = 1; PI = 3.14&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;주석(Comments)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;자바와 자바 스크립트와 같이 줄의 끝과 블럭 주석을 제공한다.:&lt;/p&gt;
&lt;pre id=&quot;code_1559015688805&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;// This is an end-of-line comment

/* This is a block comment
   on multiple lines. */&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;자바와 다르게 중첩될 수 있다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;문자열 템플릿 사용(Using&amp;nbsp;string&amp;nbsp;templates)&lt;/b&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559015786716&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    var a = 1
    // 템플릿에서 기본 이름
    val s1 = &quot;a is $a&quot; 

    a = 2
    // 템플릿에서 임의의 표현
    val s2 = &quot;${s1.replace(&quot;is&quot;, &quot;was&quot;)}, but now is $a&quot;
    // replace(a, b) : a를 b로 재배치한다.
    println(s2)
}

/* 출력 결과 */
a was 1, but now is 2&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;조건 표현식 사용(Using conditional expressions)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;:&lt;/p&gt;
&lt;pre id=&quot;code_1559016359046&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;// 기본 표현식
fun maxOf(a: Int, b: Int): Int {
    if (a &amp;gt; b) {
        return a
    } else {
        return b
    }
}

// 간단한 표현식
fun maxOf(a: Int, b: Int) = if (a &amp;gt; b) a else b

fun main() {
    println(&quot;max of 0 and 42 is ${maxOf(0, 42)}&quot;)
}

/* 출력 결과 */
max of 0 and 42 is 42&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Null가능한 변수 사용과 Null 체킹(Using&amp;nbsp;nullable&amp;nbsp;values&amp;nbsp;and&amp;nbsp;checking&amp;nbsp;for&amp;nbsp;null)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Null값이 가능할 때 nullable을 명시적으로 표시해야 한다.&lt;/p&gt;
&lt;p&gt;null 리턴 표현 함수:&lt;/p&gt;
&lt;pre id=&quot;code_1559016681431&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun parseInt(str: String): Int? {
    // ...
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;nullable 변수 리턴하는 함수 사용:&lt;/p&gt;
&lt;pre id=&quot;code_1559016747061&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun parseInt(str: String): Int? {
    return str.toIntOrNull()
}

fun printProduct(arg1: String, arg2: String) {
    val x = parseInt(arg1)
    val y = parseInt(arg2)

    // `x * y` 사용은 산출 에러 발생. null로 고정되어 있기 때문에
    if (x != null &amp;amp;&amp;amp; y != null) {
        // x, y 는 null 체크 후에 자동적으로 non-nullable로 변경된다.
        println(x * y)
    }
    else {
        println(&quot;either '$arg1' or '$arg2' is not a number&quot;)
    }    
}


fun main() {
    printProduct(&quot;6&quot;, &quot;7&quot;)
    printProduct(&quot;a&quot;, &quot;7&quot;)
    printProduct(&quot;a&quot;, &quot;b&quot;)
}

/* 출력 결과 */
42
either 'a' or '7' is not a number
either 'a' or 'b' is not a number&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;위의 방법 또는:&lt;/p&gt;
&lt;pre id=&quot;code_1559016789325&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun parseInt(str: String): Int? {
    return str.toIntOrNull()
}

fun printProduct(arg1: String, arg2: String) {
    val x = parseInt(arg1)
    val y = parseInt(arg2)
    
    // ...
    if (x == null) {
        println(&quot;Wrong number format in arg1: '$arg1'&quot;)
        return
    }
    if (y == null) {
        println(&quot;Wrong number format in arg2: '$arg2'&quot;)
        return
    }

    // x, y 는 null 체크 후에 자동적으로 non-nullable로 변경된다.
    println(x * y)
}

fun main() {
    printProduct(&quot;6&quot;, &quot;7&quot;)
    printProduct(&quot;a&quot;, &quot;7&quot;)
    printProduct(&quot;99&quot;, &quot;b&quot;)
}

/* 출력 결과 */
42
Wrong number format in arg1: 'a'
Wrong number format in arg2: 'b'&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;타입 체크와 자동 형변환 사용(Using&amp;nbsp;type&amp;nbsp;checks&amp;nbsp;and&amp;nbsp;automatic&amp;nbsp;casts)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;is&lt;/span&gt; 연산자는 표현식이 인스턴스 타입인지 아닌지 체크한다. 만약 변경 가능한 지역 변수 또는 속성이 특정 타입으로 체크되면, 명시적으로 형변환시킬 필요가 없다.:&lt;/p&gt;
&lt;pre id=&quot;code_1559017513587&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun getStringLength(obj: Any): Int? {
    if (obj is String) {
        // 이 위치에서 `obj` 는 자동으로 'String'으로 형변환된다.
        return obj.length
    }

    // 타입 체크 부분 바깥에서 'obj'는 여전히 'Any' 타입이다.
    return null
}


fun main() {
    fun printLength(obj: Any) {
        println(&quot;'$obj' string length is ${getStringLength(obj) ?: &quot;... err, not a string&quot;} &quot;)
    }
    printLength(&quot;Incomprehensibilities&quot;)
    printLength(1000)
    printLength(listOf(Any()))
}

/* 출력 결과 */
'Incomprehensibilities' string length is 21 
'1000' string length is ... err, not a string 
'[java.lang.Object@3af49f1c]' string length is ... err, not a string &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;위 방법 외에:&lt;/p&gt;
&lt;pre id=&quot;code_1559017562615&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun getStringLength(obj: Any): Int? {
    if (obj !is String) return null

    // `obj` is automatically cast to `String` in this branch
    return obj.length
}


fun main() {
    fun printLength(obj: Any) {
        println(&quot;'$obj' string length is ${getStringLength(obj) ?: &quot;... err, not a string&quot;} &quot;)
    }
    printLength(&quot;Incomprehensibilities&quot;)
    printLength(1000)
    printLength(listOf(Any()))
}

/* 출력 결과 */
'Incomprehensibilities' string length is 21 
'1000' string length is ... err, not a string 
'[java.lang.Object@3af49f1c]' string length is ... err, not a string &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;또는 :&lt;/p&gt;
&lt;pre id=&quot;code_1559017600781&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun getStringLength(obj: Any): Int? {
    // `obj` is automatically cast to `String` on the right-hand side of `&amp;amp;&amp;amp;`
    if (obj is String &amp;amp;&amp;amp; obj.length &amp;gt; 0) {
        return obj.length
    }

    return null
}


fun main() {
    fun printLength(obj: Any) {
        println(&quot;'$obj' string length is ${getStringLength(obj) ?: &quot;... err, is empty or not a string at all&quot;} &quot;)
    }
    printLength(&quot;Incomprehensibilities&quot;)
    printLength(&quot;&quot;)
    printLength(1000)
}

/* 출력 결과 */
'Incomprehensibilities' string length is 21 
'' string length is ... err, is empty or not a string at all 
'1000' string length is ... err, is empty or not a string at all &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;For 반복(Loop) 사용(Using a for loop)&lt;/b&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559017652281&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val items = listOf(&quot;apple&quot;, &quot;banana&quot;, &quot;kiwifruit&quot;)
    for (item in items) {
        println(item)
    }
}

/* 출력 결과 */
apple
banana
kiwifruit&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;또는:&lt;/p&gt;
&lt;pre id=&quot;code_1559017681850&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val items = listOf(&quot;apple&quot;, &quot;banana&quot;, &quot;kiwifruit&quot;)
    for (index in items.indices) {
        println(&quot;item at $index is ${items[index]}&quot;)
    }
}

/* 출력 결과 */
item at 0 is apple
item at 1 is banana
item at 2 is kiwifruit&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;While 반복(Loop) 사용(Using a while loops)&lt;/b&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559017734983&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val items = listOf(&quot;apple&quot;, &quot;banana&quot;, &quot;kiwifruit&quot;)
    var index = 0
    while (index &amp;lt; items.size) {
        println(&quot;item at $index is ${items[index]}&quot;)
        index++
    }
}

/* 출력 결과 */
item at 0 is apple
item at 1 is banana
item at 2 is kiwifruit&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;When 조건식 사용(Using a when expressions)&lt;/b&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559017777035&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun describe(obj: Any): String =
    when (obj) {
        1          -&amp;gt; &quot;One&quot;
        &quot;Hello&quot;    -&amp;gt; &quot;Greeting&quot;
        is Long    -&amp;gt; &quot;Long&quot;
        !is String -&amp;gt; &quot;Not a string&quot;
        else       -&amp;gt; &quot;Unknown&quot;
    }

fun main() {
    println(describe(1))
    println(describe(&quot;Hello&quot;))
    println(describe(1000L))
    println(describe(2))
    println(describe(&quot;other&quot;))
}

/* 출력 결과 */
One
Greeting
Long
Not a string
Unknown&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;범위 사용(Using ranges)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;in&lt;/span&gt; 연사자를 사용, 숫자가 범위 내에 있는지 확인:&lt;/p&gt;
&lt;pre id=&quot;code_1559017919575&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val x = 10
    val y = 9
    if (x in 1..y+1) {
        println(&quot;fits in range&quot;)
    }
}

/* 출력 결과 */
fits in range&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;숫자가 범위 밖에 있는지 확인:&lt;/p&gt;
&lt;pre id=&quot;code_1559017974405&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val list = listOf(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)

    if (-1 !in 0..list.lastIndex) {
        println(&quot;-1 is out of range&quot;)
    }
    if (list.size !in list.indices) {
        println(&quot;list size is out of valid list indices range, too&quot;)
    }
}

/* 출력 결과 */
-1 is out of range
list size is out of valid list indices range, too&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;범위 내에 반복:&lt;/p&gt;
&lt;pre id=&quot;code_1559018097962&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    for (x in 1..5) {
        print(x)
    }
}

/* 출력 결과 */
12345&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;오름 또는 내림차순으로 특정 값 차이 반복:&lt;/p&gt;
&lt;pre id=&quot;code_1559018210620&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    for (x in 1..10 step 2) {
        print(x)
    }
    println()
    for (x in 9 downTo 0 step 3) {
        print(x)
    }
}

/* 출력 결과 */
13579
9630&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;컬렉션(Collections) 사용&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;컬렉션 내에 반복:&lt;/p&gt;
&lt;pre id=&quot;code_1559018390279&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val items = listOf(&quot;apple&quot;, &quot;banana&quot;, &quot;kiwifruit&quot;)
    for (item in items) {
        println(item)
    }
}

/* 출력 결과 */
apple
banana
kiwifruit&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style=&quot;color: #1b9ae6;&quot;&gt;in&lt;/span&gt; 연산자를 사용해서, 컬렉션이 객체를 포함하고 있는 지 체크:&lt;/p&gt;
&lt;pre id=&quot;code_1559018534793&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val items = setOf(&quot;apple&quot;, &quot;banana&quot;, &quot;kiwifruit&quot;)
    when {
        &quot;orange&quot; in items -&amp;gt; println(&quot;juicy&quot;)
        &quot;apple&quot; in items -&amp;gt; println(&quot;apple is fine too&quot;)
    }
}

/* 출력 결과 */
apple is fine too&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;람다 표현식(&lt;span style=&quot;color: #333333;&quot;&gt;lambda expressions)을 사용한 필터링과 맵 컬렉션:&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559018640203&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
  val fruits = listOf(&quot;banana&quot;, &quot;avocado&quot;, &quot;apple&quot;, &quot;kiwifruit&quot;)
  fruits
    .filter { it.startsWith(&quot;a&quot;) }
    .sortedBy { it }
    .map { it.toUpperCase() }
    .forEach { println(it) }
}

/* 출력 결과 */
APPLE
AVOCADO&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: #333333;&quot;&gt;기본 클래스와 인스턴스 생성(Creating&amp;nbsp;basic&amp;nbsp;classes&amp;nbsp;and&amp;nbsp;their&amp;nbsp;instances)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1559018706735&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun main() {
    val rectangle = Rectangle(5.0, 2.0) //'new' 키워드를 사용하지 않음
    val triangle = Triangle(3.0, 4.0, 5.0)
    println(&quot;Area of rectangle is ${rectangle.calculateArea()}, its perimeter is ${rectangle.perimeter}&quot;)
    println(&quot;Area of triangle is ${triangle.calculateArea()}, its perimeter is ${triangle.perimeter}&quot;)
}

abstract class Shape(val sides: List&amp;lt;Double&amp;gt;) {
    val perimeter: Double get() = sides.sum()
    abstract fun calculateArea(): Double
}

interface RectangleProperties {
    val isSquare: Boolean
}

class Rectangle(
    var height: Double,
    var length: Double
) : Shape(listOf(height, length, height, length)), RectangleProperties {
    override val isSquare: Boolean get() = length == height
    override fun calculateArea(): Double = height * length
}

class Triangle(
    var sideA: Double,
    var sideB: Double,
    var sideC: Double
) : Shape(listOf(sideA, sideB, sideC)) {
    override fun calculateArea(): Double {
        val s = perimeter / 2
        return Math.sqrt(s * (s - sideA) * (s - sideB) * (s - sideC))
    }
}

/* 출력 결과 */
Area of rectangle is 10.0, its perimeter is 14.0
Area of triangle is 6.0, its perimeter is 12.0&lt;/code&gt;&lt;/pre&gt;</description>
      <category>개발자의 길/Kotlin</category>
      <category>Kotlin#Snyax#문법모음</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/147</guid>
      <comments>https://jhmocu.tistory.com/147#entry147comment</comments>
      <pubDate>Tue, 28 May 2019 13:45:57 +0900</pubDate>
    </item>
    <item>
      <title>코틀린 개발환경 구축 및 출력</title>
      <link>https://jhmocu.tistory.com/141</link>
      <description>&lt;p&gt;코틀린 통합개발환경인 IntelliJ IDE를 설치하고 문자를 출력하도록 하자.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;코틀린은, 앞서 설명한 것처럼 다양한 개발 환경에서 사용이 가능하고 온라인으로 실행이 가능하니 목적에 맞게 사용하면 된다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;온라인 사이트 :&amp;nbsp;&lt;a href=&quot;https://play.kotlinlang.org/&quot;&gt;https://play.kotlinlang.org/&lt;/a&gt;&lt;/p&gt;
&lt;figure id=&quot;og_1558936424159&quot; contenteditable=&quot;false&quot; data-ke-type=&quot;opengraph&quot;&gt;&lt;a href=&quot;https://play.kotlinlang.org/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; data-original-url=&quot;https://play.kotlinlang.org/&quot;&gt;
&lt;div class=&quot;og-image&quot; style=&quot;background-image: url();&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;og-text&quot;&gt;
&lt;p class=&quot;og-title&quot;&gt;Kotlin Playground: Edit, Run, Share Kotlin Code Online&lt;/p&gt;
&lt;p class=&quot;og-desc&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class=&quot;og-host&quot;&gt;play.kotlinlang.org&lt;/p&gt;
&lt;/div&gt;
&lt;/a&gt;&lt;/figure&gt;
&lt;p&gt;&amp;lt;IntelliJ 설치&amp;gt;&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;&lt;a href=&quot;http://www.jetbrains.com&quot;&gt;www.jetbrains.com&lt;/a&gt;&amp;nbsp;접속 후 Download 클릭&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bajm3B/btqvCJUH4h3/VvfJHwHVpjCcHNcl2SxFMK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bajm3B/btqvCJUH4h3/VvfJHwHVpjCcHNcl2SxFMK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bajm3B/btqvCJUH4h3/VvfJHwHVpjCcHNcl2SxFMK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbajm3B%2FbtqvCJUH4h3%2FVvfJHwHVpjCcHNcl2SxFMK%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;2. 본인이 사용하는 운영 체제 선택(필자는 Windows선택) 후, Community 항목에 Download를 클릭&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/YQhid/btqvCK69Tp8/7jqZy99l6kPPjG0TUWypy1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/YQhid/btqvCK69Tp8/7jqZy99l6kPPjG0TUWypy1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/YQhid/btqvCK69Tp8/7jqZy99l6kPPjG0TUWypy1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FYQhid%2FbtqvCK69Tp8%2F7jqZy99l6kPPjG0TUWypy1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;3. 다운로드 된 idealC-2019.1.2.exe 파일을 실행하여 설치 진행(Next만 눌러도 된다.)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/7TwUY/btqvAf15L2o/bJoIkNxXKlKFvs5KKwNge0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/7TwUY/btqvAf15L2o/bJoIkNxXKlKFvs5KKwNge0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/7TwUY/btqvAf15L2o/bJoIkNxXKlKFvs5KKwNge0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2F7TwUY%2FbtqvAf15L2o%2FbJoIkNxXKlKFvs5KKwNge0%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;4. 설치가 완료되고 아이콘을 클릭하여 실행. Creat New Project 클릭&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bcnLBE/btqvACb9kBt/BxsmlmxZLV8lT83nP7oLUk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bcnLBE/btqvACb9kBt/BxsmlmxZLV8lT83nP7oLUk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bcnLBE/btqvACb9kBt/BxsmlmxZLV8lT83nP7oLUk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbcnLBE%2FbtqvACb9kBt%2FBxsmlmxZLV8lT83nP7oLUk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;5. Creat New Project를 클릭하면 다음과 같은 화면이 나타난다.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/yurP3/btqvzKHZ976/6WJyNrqnUFEdBOlwHk08jk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/yurP3/btqvzKHZ976/6WJyNrqnUFEdBOlwHk08jk/img.png&quot; data-alt=&quot;Kotlin/JVM을 선택한 후 Next 클릭&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/yurP3/btqvzKHZ976/6WJyNrqnUFEdBOlwHk08jk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FyurP3%2FbtqvzKHZ976%2F6WJyNrqnUFEdBOlwHk08jk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;Kotlin/JVM을 선택한 후 Next 클릭&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;* 참고 : Project SDK가 No SDK로 뜬다면 JDK 설치가 되지 않은&amp;nbsp; 것이다. 따라서 JDK를 설치한 뒤 폴더 경로를 지정해주어야 한다.(JDK 설치는 자바 설치 부분에서 참조)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;6. Next를 클릭하여 Project Name을 입력하고 Finish 클릭한다.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/MKrZl/btqvAAZb6o3/6U0pfdJtYw7kgCOqqYZgJK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/MKrZl/btqvAAZb6o3/6U0pfdJtYw7kgCOqqYZgJK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/MKrZl/btqvAAZb6o3/6U0pfdJtYw7kgCOqqYZgJK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FMKrZl%2FbtqvAAZb6o3%2F6U0pfdJtYw7kgCOqqYZgJK%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;7. 약간의 로딩 후 다음과 같은 화면이 나타나면 성공이다.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bKuvEN/btqvAQAJdYD/MU93qWRpbqg7Dfw2BaID6k/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bKuvEN/btqvAQAJdYD/MU93qWRpbqg7Dfw2BaID6k/img.png&quot; data-alt=&quot;Hello Kotlin &amp;amp;amp;gt; src 폴더에 코트를 생성할 예정이다.&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bKuvEN/btqvAQAJdYD/MU93qWRpbqg7Dfw2BaID6k/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbKuvEN%2FbtqvAQAJdYD%2FMU93qWRpbqg7Dfw2BaID6k%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;Hello Kotlin &amp;gt; src 폴더에 코트를 생성할 예정이다.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;8. src 폴더를 선택한 후 마우스 오른쪽 클릭 -&amp;gt; New Kotlin File/Class 선택&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/d0fHm0/btqvAeoApQ1/tt2ZyK9BkNwzVqlwGuGyK0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/d0fHm0/btqvAeoApQ1/tt2ZyK9BkNwzVqlwGuGyK0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/d0fHm0/btqvAeoApQ1/tt2ZyK9BkNwzVqlwGuGyK0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fd0fHm0%2FbtqvAeoApQ1%2Ftt2ZyK9BkNwzVqlwGuGyK0%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;9. 제목을 Hello으로 작성하고 다음과 같이 코드 작성 후 Alt+Shift+F10(실행 단축키)를 누른다.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/6DAz5/btqvA880GKp/mdPNgTeaTccD2xP4RNjm6K/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/6DAz5/btqvA880GKp/mdPNgTeaTccD2xP4RNjm6K/img.png&quot; data-alt=&quot;println()안에 문자가 잘 출력되었다.&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/6DAz5/btqvA880GKp/mdPNgTeaTccD2xP4RNjm6K/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2F6DAz5%2FbtqvA880GKp%2FmdPNgTeaTccD2xP4RNjm6K%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;println()안에 문자가 잘 출력되었다.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/p&gt;</description>
      <category>개발자의 길/Kotlin</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/141</guid>
      <comments>https://jhmocu.tistory.com/141#entry141comment</comments>
      <pubDate>Mon, 27 May 2019 15:36:03 +0900</pubDate>
    </item>
    <item>
      <title>Kotlin이란 무엇인가</title>
      <link>https://jhmocu.tistory.com/140</link>
      <description>&lt;p&gt;1. 코틀린(Kotiln)?&lt;/p&gt;
&lt;p&gt;IntelliJ IDEA의 개발사 JetBrains에서 2011년에 공개한 프로그래밍 언어.&lt;/p&gt;
&lt;p&gt;JVM(Java Virtual Mechine) 기반의 언어이며, &lt;b&gt;Java와의 상호 운용이 100% 가능.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;안드로이드,&amp;nbsp;스프링&amp;nbsp;프레임워크,&amp;nbsp;톰캣,&amp;nbsp;JavaScript,&amp;nbsp;Java&amp;nbsp;EE,&amp;nbsp;HTML5,&amp;nbsp;iOS,&amp;nbsp;라즈베리&amp;nbsp;파이 등을 개발할 때 사용 가능.&lt;/p&gt;
&lt;p&gt;2017년 구글이 안드로이드 공식 언어로 채택함으로써 관심이 증가하게 되었음.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. 왜 코틀린을 사용하는가?&lt;/p&gt;
&lt;p&gt;- 간결함 : 상용구 코드의 양을 대폭적으로 줄여줌&lt;/p&gt;
&lt;p&gt;getters,&amp;nbsp;setters,&amp;nbsp;equals(),&amp;nbsp;hashCode(),&amp;nbsp;toString(),&amp;nbsp;copy()&amp;nbsp;함수들을&amp;nbsp;포함한&amp;nbsp;POJO(Plain&amp;nbsp;Old&amp;nbsp;Java&amp;nbsp;Object)를&amp;nbsp;한 줄에&amp;nbsp;생성:&lt;/p&gt;
&lt;pre id=&quot;code_1558939861621&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;data class Customer(val name: String, val email: String, val company: String)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style=&quot;color: #333333;&quot;&gt;람다식을 사용하여 목록 필터링:&lt;/span&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1558939891777&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val positiveNumbers = list.filter { it &amp;gt; 0 }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;싱글톤 객채를 생성:&lt;/p&gt;
&lt;pre id=&quot;code_1558939904153&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;object ThisIsASingleton { val companyName: String = &quot;JetBrains&quot; }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- 안전함 : 'null pointer exceptions'와 같은 전체 클래스의 에러를 방지&lt;/p&gt;
&lt;p&gt;NullPointerExceptions 제거하여, 실수를 방지&lt;/p&gt;
&lt;pre id=&quot;code_1558939924039&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;var output: String
output = null   // Compilation error&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;null 입력 가능 타입에서 실수로 실행되는 것을 방지&lt;/p&gt;
&lt;pre id=&quot;code_1558939936216&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;val name: String? = null    // Nullable type
println(name.length())      // Compilation error&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;타입이 올바른지 확인하면, 컴파일러가 자동 캐스팅을 실행&lt;/p&gt;
&lt;pre id=&quot;code_1558939951740&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;fun calculateTotal(obj: Any) {
    if (obj is Invoice)
        obj.calculateTotal()
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;- 상호 운용성 : JVM, Android, Browser 등을 위한 라이브러리에 강점이 존재&lt;/p&gt;
&lt;p&gt;JVM에 존재하는 라이브러리를 사용하면, 100% 호환 가능:&lt;/p&gt;
&lt;pre id=&quot;code_1558940010392&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;import io.reactivex.Flowable
import io.reactivex.schedulers.Schedulers

Flowable
    .fromCallable {
        Thread.sleep(1000) //  imitate expensive computation
        &quot;Done&quot;
    }
    .subscribeOn(Schedulers.io())
    .observeOn(Schedulers.single())
    .subscribe(::println, Throwable::printStackTrace)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;JVM 또는 JavaScript을 대상으로 가능. 코틀린으로 작성하고 게재할 곳을 결정 가능&lt;/p&gt;
&lt;pre id=&quot;code_1558940028060&quot; class=&quot;kotlin&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;import kotlin.browser.window

fun onLoad() {
    window.document.body!!.innerHTML += &quot;&amp;lt;br/&amp;gt;Hello, Kotlin!&quot;
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;- 도구 친화적 : JAVA IDE 또는 Build를 Command Line에서 선택 가능&lt;/p&gt;
&lt;p&gt;JetBrain에서 언어의 Tooling에 도움을 줌&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignLeft&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/MPOgq/btqvBqapVBW/ITllwmeZB2h4hz0tANJEnK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/MPOgq/btqvBqapVBW/ITllwmeZB2h4hz0tANJEnK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/MPOgq/btqvBqapVBW/ITllwmeZB2h4hz0tANJEnK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FMPOgq%2FbtqvBqapVBW%2FITllwmeZB2h4hz0tANJEnK%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;figure class=&quot;imageblock alignLeft&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/dkV1f4/btqvABjq5he/TXnO6wPJQ9dnhd5CErIRpk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/dkV1f4/btqvABjq5he/TXnO6wPJQ9dnhd5CErIRpk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/dkV1f4/btqvABjq5he/TXnO6wPJQ9dnhd5CErIRpk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdkV1f4%2FbtqvABjq5he%2FTXnO6wPJQ9dnhd5CErIRpk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>개발자의 길/Kotlin</category>
      <category>Kotlin #소개 및 특징</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/140</guid>
      <comments>https://jhmocu.tistory.com/140#entry140comment</comments>
      <pubDate>Mon, 27 May 2019 14:05:49 +0900</pubDate>
    </item>
    <item>
      <title>[Eclipse-GitHub 연동] GitHub 가입하기</title>
      <link>https://jhmocu.tistory.com/139</link>
      <description>&lt;p&gt;&amp;nbsp;보통 프로젝트 개발을 하다보면 여러사람과 함께 진행하거나 다름 사람들과 코드를 공유하는 경우가 많다.&lt;/p&gt;&lt;p&gt;코드를 공유하거나 관리해주는 코드 저장소로 GitHub, SVN 등이 있다. 그 중 오픈 소스가 많이 존재하는 GitHub에 대한 정보와 사용법을 알아보도록 하자.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;lt;GitHub 란?&amp;gt;&lt;/p&gt;&lt;p&gt;- 분산 버전 관리 툴인 깃(Git)을 사용하는 프로젝트를 지원하는 웹호스팅 서비스. 여러 사람이 하나의 프로젝트를 분할해서 진행하다보면, 코드를 통합하거나 진행 사항을 확인해야할 경우가 많다. 또한 두 사람 이상이 같은 클래스에 작업을 하는 경우, 한사람의 작업이 겹쳐지거나 지워질 수 있다. GitHub는&amp;nbsp;이러한 상황에서 버전별로 프로그램 상황을 관리해서 중복을 방지하거나 실수한 코드를 되돌릴 수 있도록 도와준다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;lt;GitHub 가입하기&amp;gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;1. &lt;a href=&quot;https://github.com/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;깃허브 닷컴&lt;/a&gt;으로 접속 후 [Sign up] 클릭&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 820px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/990ED03E5B5575FE37&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F990ED03E5B5575FE37&quot; width=&quot;820&quot; height=&quot;512&quot; filename=&quot;git1.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;2. 사용자 이름, 이메일, 비밀번호를 입력하고 [계정 생성]을 클릭&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 820px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/99B0BC3B5B55768221&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F99B0BC3B5B55768221&quot; width=&quot;820&quot; height=&quot;660&quot; filename=&quot;git2.png&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;3. Choose Personal Plan에서 유료 무료 사용을 선택하고 [Continue] 클릭&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 820px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/99C5D94E5B55784B17&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F99C5D94E5B55784B17&quot; width=&quot;820&quot; height=&quot;574&quot; filename=&quot;git3.png&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;4. Step 3에서 프로그래밍 경험에 대한 체크 및 [Submit]을 클릭하면&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;회원가입이 완료된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>개발자의 길/자료</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/139</guid>
      <comments>https://jhmocu.tistory.com/139#entry139comment</comments>
      <pubDate>Mon, 23 Jul 2018 15:44:57 +0900</pubDate>
    </item>
    <item>
      <title>JSP include Directive(지시자)</title>
      <link>https://jhmocu.tistory.com/125</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;지시자를 이용한 파일 포함&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;include 지시자(directive) 동작 원리:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- include를 사용해서 다른 파일(jsp, jspf)을 포함시키면, 하나의 JSP 파일로 합쳐진 이후에, 서블릿 클래스로 변환&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;header.jspf&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#0086b3&quot;&gt;@&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;page&lt;/span&gt;&amp;nbsp;language&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;java&quot;&lt;/span&gt;&amp;nbsp;contentType&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;text/html;&amp;nbsp;charset=UTF-8&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pageEncoding&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;style&lt;/span&gt;&amp;gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;.header&amp;nbsp;&lt;/span&gt;{&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background-color&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;lightgreen&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;font-size&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;200%&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;text-align&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;center&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;60px&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;style&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;header&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;여기는&amp;nbsp;Header입니다...&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;footer.jspf&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#0086b3&quot;&gt;@&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;page&lt;/span&gt;&amp;nbsp;language&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;java&quot;&lt;/span&gt;&amp;nbsp;contentType&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;text/html;&amp;nbsp;charset=UTF-8&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pageEncoding&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;style&lt;/span&gt;&amp;gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;.footer&amp;nbsp;&lt;/span&gt;{&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background-color&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;lightblue&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;text-align&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;center&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;60px&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;style&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;footer&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;(주)&amp;nbsp;무한상사&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;br/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;http://www.무한상사.co.kr&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;br/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;TEL:&amp;nbsp;02-1132-3333&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;04_include&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#0086b3&quot;&gt;@&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;page&lt;/span&gt;&amp;nbsp;language&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;java&quot;&lt;/span&gt;&amp;nbsp;contentType&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;text/html;&amp;nbsp;charset=UTF-8&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pageEncoding&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;!DOCTYPE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;meta&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;charset&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;JSP&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&amp;nbsp;header&amp;nbsp;파일을&amp;nbsp;include&amp;nbsp;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#0086b3&quot;&gt;@&lt;/span&gt;&amp;nbsp;include&amp;nbsp;file&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;header.jspf&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;include&amp;nbsp;Directive(지시자)&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;본문입니다....&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&amp;nbsp;footer&amp;nbsp;파일을&amp;nbsp;include&amp;nbsp;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#0086b3&quot;&gt;@&lt;/span&gt;&amp;nbsp;include&amp;nbsp;file&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;footer.jspf&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;출력화면&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 733px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2442624358EDBD8210&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2442624358EDBD8210&quot; width=&quot;733&quot; height=&quot;301&quot; filename=&quot;jsp05.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>개발자의 길/JSP</category>
      <category>include</category>
      <category>jsp</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/125</guid>
      <comments>https://jhmocu.tistory.com/125#entry125comment</comments>
      <pubDate>Wed, 12 Apr 2017 14:39:44 +0900</pubDate>
    </item>
    <item>
      <title>JSP 에러 페이지 처리</title>
      <link>https://jhmocu.tistory.com/124</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;Directive를 사용한 에러 페이지 처리&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- JSP를 실행하는 도중에 Exception이 발생하면&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;errorPage 속성에 지정된 페이지로 이동&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;02_errorPage.html&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#0086b3&quot;&gt;@&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;page&lt;/span&gt;&amp;nbsp;language&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;java&quot;&lt;/span&gt;&amp;nbsp;contentType&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;text/html;&amp;nbsp;charset=UTF-8&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pageEncoding&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#0086b3&quot;&gt;@&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;page&lt;/span&gt;&amp;nbsp;errorPage&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;error.jsp&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&amp;nbsp;JSP를&amp;nbsp;실행하는&amp;nbsp;도중에&amp;nbsp;Exception이&amp;nbsp;발생하면&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;errorPage&amp;nbsp;속성에&amp;nbsp;지정된&amp;nbsp;페이지로&amp;nbsp;이동&amp;nbsp;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;!DOCTYPE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;meta&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;charset&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;JSP&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;Directive를&amp;nbsp;사용한&amp;nbsp;에러&amp;nbsp;페이지&amp;nbsp;처리&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&amp;nbsp;나눗셈&amp;nbsp;결과:&amp;nbsp;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;(&lt;span style=&quot;color:#c10aff&quot;&gt;123&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#c10aff&quot;&gt;0&lt;/span&gt;)&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;출력화면&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 393px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/232CC84B58EDBBC21B&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F232CC84B58EDBBC21B&quot; width=&quot;393&quot; height=&quot;117&quot; filename=&quot;jsp03.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;hr&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;03_errorPage.html&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#0086b3&quot;&gt;@&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;page&lt;/span&gt;&amp;nbsp;language&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;java&quot;&lt;/span&gt;&amp;nbsp;contentType&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;text/html;&amp;nbsp;charset=UTF-8&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pageEncoding&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;!DOCTYPE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;meta&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;charset&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;JSP&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;배포&amp;nbsp;관리자(web.xml)을&amp;nbsp;사용한&amp;nbsp;에러&amp;nbsp;페이지&amp;nbsp;처리&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;none.jsp&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;파일이&amp;nbsp;없는&amp;nbsp;링크(404&amp;nbsp;에러)&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;a&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;계산&amp;nbsp;결과:&amp;nbsp;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;(&lt;span style=&quot;color:#c10aff&quot;&gt;123&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#c10aff&quot;&gt;0&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;web.xml&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;?xml&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;version&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;encoding&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;?&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;web-app&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;xmlns:xsi&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;xmlns&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;http://xmlns.jcp.org/xml/ns/javaee&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;xsi:schemaLocation&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;http://xmlns.jcp.org/xml/ns/javaee&amp;nbsp;http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;WebApp_ID&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;version&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;3.1&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;display-name&lt;/span&gt;&amp;gt;WEB07_JSP1&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;display-name&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;welcome-file-list&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;welcome-file&lt;/span&gt;&amp;gt;index.html&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;welcome-file&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;welcome-file&lt;/span&gt;&amp;gt;index.htm&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;welcome-file&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;welcome-file&lt;/span&gt;&amp;gt;index.jsp&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;welcome-file&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;welcome-file&lt;/span&gt;&amp;gt;default.html&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;welcome-file&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;welcome-file&lt;/span&gt;&amp;gt;default.htm&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;welcome-file&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;welcome-file&lt;/span&gt;&amp;gt;default.jsp&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;welcome-file&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;welcome-file-list&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;error-page&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;error-code&lt;/span&gt;&amp;gt;404&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;error-code&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;location&lt;/span&gt;&amp;gt;/error/code404.jsp&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;location&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;error-page&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;error-page&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;error-code&lt;/span&gt;&amp;gt;500&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;error-code&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;location&lt;/span&gt;&amp;gt;/error/code500.jsp&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;location&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;error-page&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;web-app&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;츨력화면&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 708px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/234A9F4D58EDBC853A&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F234A9F4D58EDBC853A&quot; width=&quot;708&quot; height=&quot;145&quot; filename=&quot;jsp04.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>개발자의 길/JSP</category>
      <category>errorpage</category>
      <category>jsp</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/124</guid>
      <comments>https://jhmocu.tistory.com/124#entry124comment</comments>
      <pubDate>Wed, 12 Apr 2017 14:35:52 +0900</pubDate>
    </item>
    <item>
      <title>JSP 동작원리 및 구성 요소(TAG)</title>
      <link>https://jhmocu.tistory.com/123</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;JSP 동작원리&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;1. 런타임 시에 JSP 컴파일러에 의해서 JSP 파일(.jsp)이 자바 파일(.java)로 변환&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;==&amp;gt; 서블릿 클래스&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;2. 자바 컴파일러가 자바 파일을 컴파일해서 클래스 파일(.class)을 생성&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;3. JRE이 클래스 파일을 기계어로 번역해서 실행&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;==&amp;gt; 요청(request), 응답(response)를 처리&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;JSP 구성요소&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;1. &amp;lt;%@ %&amp;gt;: Directive(지시자)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;nbsp; &amp;nbsp;JSP 페이지 전체에 대한 속성들을 설정&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;2. &amp;lt;%! %&amp;gt;: Declaration(선언문)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;nbsp; 멤버 변수, 메소드, 내부 클래스를 선언하는 부분&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;3. &amp;lt;% %&amp;gt;: Scriptlet(스크립트릿)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;nbsp; 메소드(_jspService) 내부에서 실행되는 자바 코드를 작성하는 부분&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;4. &amp;lt;%= %&amp;gt;: Expression(표현식)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;nbsp; 변수의 값, 메소드의 리턴 값 등을 프린트&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;5. &amp;lt;%-- --%&amp;gt;: &lt;/span&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;Comment(주석)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;nbsp; JSP 주석은 서블릿 클래스로 변환될 때 코드로 변환되지 않음!&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;01_JSPTag.jsp&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;35&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;36&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;37&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;38&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;39&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;40&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;41&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;42&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;43&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;44&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;45&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#0086b3&quot;&gt;@&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;page&lt;/span&gt;&amp;nbsp;language&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;java&quot;&lt;/span&gt;&amp;nbsp;contentType&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;text/html;&amp;nbsp;charset=UTF-8&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pageEncoding&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;java.util.Date&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;!DOCTYPE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;meta&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;charset&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;JSP&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;!--&amp;nbsp;HTML/XML&amp;nbsp;주석&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;h1&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;JSP&amp;nbsp;Tag(구성요소)&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;/&lt;/span&gt;h1&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&amp;nbsp;Declaration(선언문)&amp;nbsp;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;!&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;int&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;add&lt;/span&gt;(&lt;span style=&quot;color:#4be6fa&quot;&gt;int&lt;/span&gt;&amp;nbsp;x,&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;int&lt;/span&gt;&amp;nbsp;y){&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;x&amp;nbsp;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;+&lt;/span&gt;&amp;nbsp;y;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&amp;nbsp;Scriptlet&amp;nbsp;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;지역&amp;nbsp;변수&amp;nbsp;선언&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;int&lt;/span&gt;&amp;nbsp;result&amp;nbsp;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;add&lt;/span&gt;(&lt;span style=&quot;color:#c10aff&quot;&gt;10&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;20&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;JSP에서&amp;nbsp;출력&amp;nbsp;방법&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;1)&amp;nbsp;console&amp;nbsp;로그&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;System&lt;/span&gt;.&lt;span style=&quot;color:#4be6fa&quot;&gt;out&lt;/span&gt;.&lt;span style=&quot;color:#4be6fa&quot;&gt;println&lt;/span&gt;(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;result&amp;nbsp;=&amp;nbsp;&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;+&lt;/span&gt;&amp;nbsp;result);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;2)&amp;nbsp;Writer&amp;nbsp;객체를&amp;nbsp;사용해서&amp;nbsp;응답(response)으로&amp;nbsp;출력&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;Servlet에서처럼&amp;nbsp;response.getWriter()를&amp;nbsp;호출하면&amp;nbsp;안됨!&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;JSP가&amp;nbsp;변환된&amp;nbsp;서블릿&amp;nbsp;클래스의&amp;nbsp;내장&amp;nbsp;객체인&amp;nbsp;out&amp;nbsp;객체를&amp;nbsp;사용해서&amp;nbsp;프린트&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;out&lt;/span&gt;.write(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;&amp;lt;p&amp;gt;result&amp;nbsp;=&amp;nbsp;&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;+&lt;/span&gt;&amp;nbsp;result&amp;nbsp;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;+&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;&amp;lt;/p&amp;gt;\r\n&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&amp;nbsp;Expression&amp;nbsp;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;결과&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;result&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;Date&amp;nbsp;date&amp;nbsp;&lt;span style=&quot;color:#aaffaa&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;Date();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;출력화면&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 450px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/233E014158ED919D0E&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F233E014158ED919D0E&quot; width=&quot;450&quot; height=&quot;202&quot; filename=&quot;jsp02.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>개발자의 길/JSP</category>
      <category>jsp</category>
      <category>주석</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/123</guid>
      <comments>https://jhmocu.tistory.com/123#entry123comment</comments>
      <pubDate>Wed, 12 Apr 2017 11:32:06 +0900</pubDate>
    </item>
    <item>
      <title>&amp;lt;이클립스&amp;gt; JSP 파일 생성 시 포멧 변경하기</title>
      <link>https://jhmocu.tistory.com/122</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;JSP 생성 시 원하는 포멧으로 설정&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- HTML5 환경을 맞추기 위해 태그 내용을 변경할 수 있음&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- 'UTF-8'을 저장하여 항상 한글이 가능하게 수정&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;1. 메뉴 탭에서 [Window] - [Preference]를 선택&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;2. 순서대로 진행&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;3. HTML5 규격에 맞게 변경&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 733px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2375423D58ED7C8010&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2375423D58ED7C8010&quot; width=&quot;733&quot; height=&quot;590&quot; filename=&quot;jsp01.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>개발자의 길/JSP</category>
      <category>이클립스환경설정</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/122</guid>
      <comments>https://jhmocu.tistory.com/122#entry122comment</comments>
      <pubDate>Wed, 12 Apr 2017 10:02:28 +0900</pubDate>
    </item>
    <item>
      <title>자바 서블릿(Java Servlet) 시작하기</title>
      <link>https://jhmocu.tistory.com/117</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;lt;Java Servlet 이란?&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;nbsp;자바 서블릿(Java Servlet)은 자바를 사용하여 웹페이지를 동적으로 생성하는 서버측 프로그램 혹은 그 사양을 말하며, 흔히 &quot;서블릿&quot;이라 불린다.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;nbsp;자바 서블릿은 웹 서버의 성능을 향상하기 위해 사용되는 자바 클래스의 일종이다. 서블릿은 JSP와 비슷한 점이 있지만, JSP가 HTML 문서 안에 Java 코드를 포함하고 있는 반면, 서블릿은 자바 코드 안에 HTML을 포함하고 있다는 차이점이 있다.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;자바 서블릿은 자바 EE 사양의 일부분으로, 주로 이 기능을 이용하여 쇼핑몰이나 온라인 뱅킹 등의 다양한 웹 시스템이 구현되고 있다.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- 출처 &lt;/span&gt;&lt;a href=&quot;https://ko.wikipedia.org/wiki/%EC%9E%90%EB%B0%94_%EC%84%9C%EB%B8%94%EB%A6%BF&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;위키&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;lt;Servlet 시작하기&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;서블릿(servlet)은 이클립스 내에서 실행이 가능&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;서블릿은 자바 기반 프로그램이기 때문에 시작전에 자바를 설치해야 함&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;1. 이클립스 실행 및 Dynamic Web Project를 생성&lt;/span&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 733px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/221EC93D58EC311104&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F221EC93D58EC311104&quot; width=&quot;733&quot; height=&quot;594&quot; filename=&quot;ser1.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;2. Java Resources/src 밑에 패키지를 생성&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;3. [New] -&amp;gt; [Servlet]을 선택하여 서블릿 파일 생성&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 696px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2550283E58EC312427&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2550283E58EC312427&quot; width=&quot;696&quot; height=&quot;722&quot; filename=&quot;ser2.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;4. Class 이름을 선택하고 [Next]&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 548px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2764C33F58EC315834&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2764C33F58EC315834&quot; width=&quot;548&quot; height=&quot;398&quot; filename=&quot;ser3.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;5. UrlMapping은 서블릿 클래스가 실행되는 web 경로를 정의(ex.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 18.6667px;&quot;&gt;http://localhost:8181/web06/HelloServlet)&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 18.6667px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 533px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/21218B4858EC317D30&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F21218B4858EC317D30&quot; width=&quot;533&quot; height=&quot;502&quot; filename=&quot;ser4.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;6. 인터페이스와 servlet내에서 상속 받을 수 있는 메소스들을 선택할 수 있음&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 517px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/21200E5058EC320D17&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F21200E5058EC320D17&quot; width=&quot;517&quot; height=&quot;539&quot; filename=&quot;ser5.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;7. Finish 를 선택하여 종료&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 733px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/212B834F58EC322911&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F212B834F58EC322911&quot; width=&quot;733&quot; height=&quot;482&quot; filename=&quot;ser6.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 18.6667px;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>개발자의 길/Servlet</category>
      <category>javaservlet</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/117</guid>
      <comments>https://jhmocu.tistory.com/117#entry117comment</comments>
      <pubDate>Tue, 11 Apr 2017 10:32:50 +0900</pubDate>
    </item>
    <item>
      <title>jQuery 애니메이션(animate) 01</title>
      <link>https://jhmocu.tistory.com/116</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;animate() 함수를 이용한 애니메이션 효과&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;* animate 함수 포멧&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- animate(params, speed, callback)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- &amp;nbsp; params: 애니메이션을 할 속성들(JavaScript Object)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;* 애니메이션 함수들&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- hide(speed, callback), fadeOut(speed, callback), slideUp()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- show(speed, callback), fadeIn(speed, callback), slideDown()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- toggle(speed, callback), fadeToggle(spped, callback), slideToggle()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;09_animate.html&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;35&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;36&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;37&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;38&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;39&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;40&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;41&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;42&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;!DOCTYPE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;meta&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;charset&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;jQuery&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;style&lt;/span&gt;&amp;gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;#panel&amp;nbsp;&lt;/span&gt;{&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;border&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;1px&amp;nbsp;solid&amp;nbsp;grey&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background-color&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;lime&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;200px&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;200px&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;style&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;jQuery&amp;nbsp;애니메이션&amp;nbsp;함수들&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;button&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;btn1&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;Hide&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;button&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;btn2&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;Show&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;button&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;btn3&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;Toggle&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;panel&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;Animation&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;!--&amp;nbsp;jQuery&amp;nbsp;CDN&amp;nbsp;포함:&amp;nbsp;라이브러리&amp;nbsp;포함&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;$(&lt;span style=&quot;color:#4be6fa&quot;&gt;document&lt;/span&gt;).ready(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#btn1'&lt;/span&gt;).click(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;(){&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#panel'&lt;/span&gt;).slideUp(&lt;span style=&quot;color:#c10aff&quot;&gt;3000&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#btn2'&lt;/span&gt;).click(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;(){&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#panel'&lt;/span&gt;).slideDown(&lt;span style=&quot;color:#c10aff&quot;&gt;3000&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#btn3'&lt;/span&gt;).click(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;(){&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#panel'&lt;/span&gt;).slideToggle(&lt;span style=&quot;color:#c10aff&quot;&gt;3000&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;10_animate.html&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;!DOCTYPE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;meta&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;charset&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;jQuery&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;style&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;text/css&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&amp;gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;#panel&amp;nbsp;&lt;/span&gt;{&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;border&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;1px&amp;nbsp;solid&amp;nbsp;grey&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background-color&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;lime&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;100px&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;100px&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;position&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;relative&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;style&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;jQuery&amp;nbsp;animate()&amp;nbsp;함수&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;button&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;btn1&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;위치&amp;nbsp;이동&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;panel&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;jQuery&amp;nbsp;animate&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;!--&amp;nbsp;jQuery&amp;nbsp;CDN&amp;nbsp;포함:&amp;nbsp;라이브러리&amp;nbsp;포함&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;$(&lt;span style=&quot;color:#4be6fa&quot;&gt;document&lt;/span&gt;).ready(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#btn1'&lt;/span&gt;).click(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#panel'&lt;/span&gt;).animate({left:&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;'300px'&lt;/span&gt;,&amp;nbsp;top:&lt;span style=&quot;color:#ffd500&quot;&gt;'300px'&lt;/span&gt;,&amp;nbsp;fontSize:&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;'200%'&lt;/span&gt;,&amp;nbsp;opacity:&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;'0.5'&lt;/span&gt;},&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;3000&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;출력화면&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- 09_animate.html&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 633px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2253524F58EC287830&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2253524F58EC287830&quot; width=&quot;633&quot; height=&quot;304&quot; filename=&quot;jquery09_1.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 477px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2309F34F58EC28792A&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2309F34F58EC28792A&quot; width=&quot;477&quot; height=&quot;204&quot; filename=&quot;jquery09_2.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- 10_animate.html&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 472px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/23291A4F58EC289E30&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F23291A4F58EC289E30&quot; width=&quot;472&quot; height=&quot;269&quot; filename=&quot;jquery10_1.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 502px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/244E7B4F58EC289F2F&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F244E7B4F58EC289F2F&quot; width=&quot;502&quot; height=&quot;567&quot; filename=&quot;jquery10_2.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>개발자의 길/jQuery</category>
      <category>animate</category>
      <category>jQuery</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/116</guid>
      <comments>https://jhmocu.tistory.com/116#entry116comment</comments>
      <pubDate>Tue, 11 Apr 2017 09:52:22 +0900</pubDate>
    </item>
    <item>
      <title>jQuery 반복문(each)</title>
      <link>https://jhmocu.tistory.com/115</link>
      <description>&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;lt;jQuery의 반복문 사용 : each() 함수&lt;/span&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- 홀수줄은 hotpink &lt;/span&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;, 짝수줄은 aqua로 출력&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- '컬렉션'.each(handler);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- handler: 컬렉션의 모든 원소들에 대해서 적용할 기능(동작)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;08_each.html&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;35&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;36&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;37&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;38&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;39&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;40&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;41&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;42&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;43&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;44&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;45&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;46&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;47&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;48&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;49&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;50&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;51&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;52&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;53&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;!DOCTYPE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;meta&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;charset&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;jQuery&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;style&lt;/span&gt;&amp;gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;.hot&amp;nbsp;&lt;/span&gt;{&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background-color&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;hotpink&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;}&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;.cold&lt;/span&gt;{&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background-color&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;aqua&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;style&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;jQuery&amp;nbsp;each()&amp;nbsp;함수&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;ul&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;li&lt;/span&gt;&amp;gt;Java&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;li&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;li&lt;/span&gt;&amp;gt;HTML&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;li&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;li&lt;/span&gt;&amp;gt;CSS&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;li&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;li&lt;/span&gt;&amp;gt;JavaScript&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;li&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;li&lt;/span&gt;&amp;gt;jQuery&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;li&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;ul&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;button&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;btn&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;Toggle&amp;nbsp;Style&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;!--&amp;nbsp;jQuery&amp;nbsp;CDN&amp;nbsp;포함:&amp;nbsp;라이브러리&amp;nbsp;포함&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#4be6fa&quot;&gt;document&lt;/span&gt;).ready(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;'컬렉션'.each(handler);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;handler:&amp;nbsp;컬렉션의&amp;nbsp;모든&amp;nbsp;원소들에&amp;nbsp;대해서&amp;nbsp;적용할&amp;nbsp;기능(동작)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#btn'&lt;/span&gt;).click(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;var&lt;/span&gt;&amp;nbsp;order&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;each는&amp;nbsp;반복문(for문과&amp;nbsp;같음)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'li'&lt;/span&gt;).each(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;(index)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;(index&amp;nbsp;%&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;2&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;0&lt;/span&gt;){&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(this).toggleClass(&lt;span style=&quot;color:#ffd500&quot;&gt;'hot'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;order&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;false&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;else&lt;/span&gt;&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(this).toggleClass(&lt;span style=&quot;color:#ffd500&quot;&gt;'cold'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;order&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;출력화면&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 328px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2364B44158EB3CA90E&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2364B44158EB3CA90E&quot; width=&quot;328&quot; height=&quot;245&quot; filename=&quot;jquery08.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 615px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/25543B4158EB3CAA0A&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F25543B4158EB3CAA0A&quot; width=&quot;615&quot; height=&quot;257&quot; filename=&quot;jquery08_1.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>개발자의 길/jQuery</category>
      <category>Each</category>
      <category>jQuery</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/115</guid>
      <comments>https://jhmocu.tistory.com/115#entry115comment</comments>
      <pubDate>Mon, 10 Apr 2017 17:05:28 +0900</pubDate>
    </item>
    <item>
      <title>jQuery CSS 변경</title>
      <link>https://jhmocu.tistory.com/114</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;jQuery의 CSS 변경 방법&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;06_css.html&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;!DOCTYPE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;meta&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;charset&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;jQuery&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;jQuery&amp;nbsp;CSS&amp;nbsp;변경&amp;nbsp;방법&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;background-color:&amp;nbsp;lightyellow&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;jQuery&amp;nbsp;CSS&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;!--&amp;nbsp;jQuery&amp;nbsp;CDN&amp;nbsp;포함:&amp;nbsp;라이브러리&amp;nbsp;포함&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;$(&lt;span style=&quot;color:#4be6fa&quot;&gt;document&lt;/span&gt;).ready(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;(){&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;jQuery를&amp;nbsp;사용한&amp;nbsp;CSS&amp;nbsp;변경&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;css('property',&amp;nbsp;value)l&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;css({prop1:&amp;nbsp;val1,&amp;nbsp;prop2:&amp;nbsp;val2,&amp;nbsp;...});&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'p'&lt;/span&gt;).click(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(this).css({&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;font:&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;'200%&amp;nbsp;serif'&lt;/span&gt;,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;backgroundColor:&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;'lightgreen'&lt;/span&gt;,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;border:&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;'1px&amp;nbsp;solid&amp;nbsp;grey'&lt;/span&gt;,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;textAlign:&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;'center'&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b style=&quot;font-size: 18.6667px;&quot;&gt;&amp;lt;07_css2.html&amp;gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b style=&quot;font-size: 18.6667px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;35&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;36&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;37&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;38&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;39&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;40&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;41&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;42&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;43&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;44&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;45&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;46&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;47&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;48&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;49&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;50&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;51&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;52&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;53&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;54&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;55&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;56&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;57&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;58&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;59&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;60&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;!DOCTYPE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;meta&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;charset&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;jQuery&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;style&lt;/span&gt;&amp;gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;.important&lt;/span&gt;{&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;font-weight&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;bold&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;font-size&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;200%&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;border&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;2px&amp;nbsp;solid&amp;nbsp;red&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;}&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;.blue&amp;nbsp;&lt;/span&gt;{&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;color&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;blue&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;}&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;table&lt;/span&gt;,&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;nbsp;th&lt;/span&gt;,&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;nbsp;td&amp;nbsp;&lt;/span&gt;{&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;}&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;body&amp;nbsp;p&lt;/span&gt;{&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;style&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;Add/Remove&amp;nbsp;CSS&amp;nbsp;class&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;p1&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;단락1&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;p2&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;단락2&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;p3&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;단락3&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;button&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;add-class&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;Add&amp;nbsp;Class&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;button&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;remove-class&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;Remove&amp;nbsp;Class&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;button&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;toggle-class&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;Toggle&amp;nbsp;Class&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;!--&amp;nbsp;jQuery&amp;nbsp;CDN&amp;nbsp;포함:&amp;nbsp;라이브러리&amp;nbsp;포함&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;$(&lt;span style=&quot;color:#4be6fa&quot;&gt;document&lt;/span&gt;).ready(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;addClass('클래스이름'):&amp;nbsp;HTML&amp;nbsp;요소에&amp;nbsp;클래스&amp;nbsp;속성을&amp;nbsp;추가&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;removeClass('클래스이름'):&amp;nbsp;HTMl&amp;nbsp;요소에서&amp;nbsp;클래스&amp;nbsp;속성을&amp;nbsp;제거&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;toggleClass('클래스이름'):&amp;nbsp;클래스&amp;nbsp;속성&amp;nbsp;추가/제거&amp;nbsp;토글&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#add-class'&lt;/span&gt;).click(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#p1'&lt;/span&gt;).addClass(&lt;span style=&quot;color:#ffd500&quot;&gt;'important'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#p2,&amp;nbsp;#p3'&lt;/span&gt;).addClass(&lt;span style=&quot;color:#ffd500&quot;&gt;'blue'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#remove-class'&lt;/span&gt;).click(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#p2,&amp;nbsp;#p3'&lt;/span&gt;).removeClass(&lt;span style=&quot;color:#ffd500&quot;&gt;'blue'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#toggle-class'&lt;/span&gt;).click(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#p2,&amp;nbsp;#p3'&lt;/span&gt;).toggleClass(&lt;span style=&quot;color:#ffd500&quot;&gt;'blue'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;출력화면&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 335px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/276FBC4558EB38C90B&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F276FBC4558EB38C90B&quot; width=&quot;335&quot; height=&quot;177&quot; filename=&quot;jquery06_1.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 336px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2458E94558EB38C920&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2458E94558EB38C920&quot; width=&quot;336&quot; height=&quot;193&quot; filename=&quot;jquery06_2.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 332px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/27024A4558EB38CA0A&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F27024A4558EB38CA0A&quot; width=&quot;332&quot; height=&quot;276&quot; filename=&quot;jquery06_3.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 335px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/233F7B4558EB38CA2C&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F233F7B4558EB38CA2C&quot; width=&quot;335&quot; height=&quot;324&quot; filename=&quot;jquery06_4.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 336px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/246A074558EB38CB2B&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F246A074558EB38CB2B&quot; width=&quot;336&quot; height=&quot;331&quot; filename=&quot;jquery06_5.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>개발자의 길/jQuery</category>
      <category>CSS 변</category>
      <category>jQuery</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/114</guid>
      <comments>https://jhmocu.tistory.com/114#entry114comment</comments>
      <pubDate>Mon, 10 Apr 2017 16:48:47 +0900</pubDate>
    </item>
    <item>
      <title>jQuery getter/setter</title>
      <link>https://jhmocu.tistory.com/113</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;jQuery 데이터 get, set&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;* 대부분의 jQuery 함수들은 매개변수의 개수에 따라서&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;getter와 setter로 사용 가능&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;nbsp;- html(): HTML 요소 내부의 html 코드를 리턴&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;nbsp;-&lt;/span&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;nbsp;html('문자열'): HTML 요소 내부에 html 코드를 씀(setter)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;nbsp;- text(): HTML 요소 내부의 텍스트(문자열)을 리턴&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;nbsp;- text('문자열'): HTML 요소 내부에 텍스트(문자열)을 씀&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;nbsp;- attr('attr 이름'): 속성(attribute)의 값을 리턴&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;nbsp;- attr('attr 이름', 'attr 값'): 속성(attr)의 값을 설정&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;nbsp;- css('css 프로퍼티 이름'): CSS 프로퍼티 값을 리턴&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;nbsp;- css('css 프로퍼티 이름', 'value'): CSS 프로퍼티에 값을 설정&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18.6667px;&quot;&gt;&amp;nbsp;- val(): input 상자에 입력된 값을 리턴&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18.6667px;&quot;&gt;&amp;nbsp;- val('값'): input 상자에 값을 씀&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;05_getset.html&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;35&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;36&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;37&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;38&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;!DOCTYPE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;meta&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;charset&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;jQuery&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;!--&amp;nbsp;jQuery&amp;nbsp;CDN&amp;nbsp;포함:&amp;nbsp;라이브러리&amp;nbsp;포함&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;$(&lt;span style=&quot;color:#4be6fa&quot;&gt;document&lt;/span&gt;).ready(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#btn1'&lt;/span&gt;).click(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;var&lt;/span&gt;&amp;nbsp;msg&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'p'&lt;/span&gt;).html();&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//innerHTML에&amp;nbsp;해당&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#output'&lt;/span&gt;).html(msg);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#btn2'&lt;/span&gt;).click(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;var&lt;/span&gt;&amp;nbsp;msg&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'p'&lt;/span&gt;).text();&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;textContent&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#output'&lt;/span&gt;).html(msg);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;jQuery&amp;nbsp;getter/setter&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;우리는&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;b&lt;/span&gt;&amp;gt;jQuery&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;b&lt;/span&gt;&amp;gt;를&amp;nbsp;공부하고&amp;nbsp;있습니다...&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;button&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;btn1&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;HTML&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;button&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;btn2&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;Text&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;output&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;출력화면&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 444px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2313F54358EB24833D&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2313F54358EB24833D&quot; width=&quot;444&quot; height=&quot;243&quot; filename=&quot;jquery05.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>개발자의 길/jQuery</category>
      <category>getter/setter</category>
      <category>jQuery</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/113</guid>
      <comments>https://jhmocu.tistory.com/113#entry113comment</comments>
      <pubDate>Mon, 10 Apr 2017 15:22:26 +0900</pubDate>
    </item>
    <item>
      <title>jQuery 이벤트(event) 02</title>
      <link>https://jhmocu.tistory.com/112</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;jQuery의 이벤트&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;04_event2.html&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;35&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;36&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;37&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;38&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;39&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;40&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;41&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;42&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;43&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;44&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;45&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;46&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;47&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;48&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;49&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;50&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;51&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;52&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;53&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;54&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;55&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;56&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;57&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;!DOCTYPE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;meta&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;charset&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;jQuery&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;style&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;text/css&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&amp;gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&amp;nbsp;&lt;/span&gt;{&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;border&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;1px&amp;nbsp;solid&amp;nbsp;grey&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;200px&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;200px&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background-color&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;lightgreen&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;font-size&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;200%&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;text-align&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;center&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;style&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;!--&amp;nbsp;jQuery&amp;nbsp;CDN&amp;nbsp;포함:&amp;nbsp;라이브러리&amp;nbsp;포함&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;$(&lt;span style=&quot;color:#4be6fa&quot;&gt;document&lt;/span&gt;).ready(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;$('selector').event(function()&amp;nbsp;{});&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;하나의&amp;nbsp;HTML&amp;nbsp;요소에&amp;nbsp;여러개의&amp;nbsp;event&amp;nbsp;handler를&amp;nbsp;등록&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;$('selector').on({&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;event1:&amp;nbsp;function()&amp;nbsp;{},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;event2:&amp;nbsp;function()&amp;nbsp;{},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;});&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'p'&lt;/span&gt;).on({&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mouseover:&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(this).css(&lt;span style=&quot;color:#ffd500&quot;&gt;'background-color'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;'lightyellow'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mouseout:&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(this).css(&lt;span style=&quot;color:#ffd500&quot;&gt;'background-color'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;'lightgreen'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;click:&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;($(this).text().match(&lt;span style=&quot;color:#ffd500&quot;&gt;'TEST'&lt;/span&gt;)){&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(this).text(&lt;span style=&quot;color:#ffd500&quot;&gt;'안녕'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;else&lt;/span&gt;&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(this).text(&lt;span style=&quot;color:#ffd500&quot;&gt;'TEST'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;jQuery&amp;nbsp;Event&amp;nbsp;2&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;TEST&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;출력화면&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18.6667px;&quot;&gt;&lt;b&gt;- 실행전&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 426px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/263F6C4D58EB200A2E&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F263F6C4D58EB200A2E&quot; width=&quot;426&quot; height=&quot;351&quot; filename=&quot;jquery04_1.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;실행후&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 411px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/246D3C4D58EB200B35&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F246D3C4D58EB200B35&quot; width=&quot;411&quot; height=&quot;350&quot; filename=&quot;jquery04_2.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>개발자의 길/jQuery</category>
      <category>Event</category>
      <category>jQuery</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/112</guid>
      <comments>https://jhmocu.tistory.com/112#entry112comment</comments>
      <pubDate>Mon, 10 Apr 2017 15:03:44 +0900</pubDate>
    </item>
    <item>
      <title>jQuery 이벤트(event) 01</title>
      <link>https://jhmocu.tistory.com/111</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;jQuery의 이벤트 함수&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;03_event.html&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;35&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;36&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;37&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;38&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;39&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;40&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;41&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;42&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;43&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;44&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;45&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;46&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;47&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;48&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;49&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;50&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;51&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;52&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;53&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;54&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;55&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;56&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;57&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;58&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;59&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;60&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;61&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;62&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;63&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;64&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;65&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;66&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;67&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;68&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;69&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;!DOCTYPE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;meta&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;charset&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;jQuery&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;jQuery&amp;nbsp;Event&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;img&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;bulb&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;alt&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;전구&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;images/bulb_off.gif&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;br/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;br/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;border:&amp;nbsp;1px&amp;nbsp;solid&amp;nbsp;black;&amp;nbsp;background-color:&amp;nbsp;green&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;hover&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;input&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;text&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;userid&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;!--&amp;nbsp;jQuery&amp;nbsp;CDN&amp;nbsp;포함:&amp;nbsp;라이브러리&amp;nbsp;포함&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;$(document).ready(function()&amp;nbsp;{});&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;$(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;mouseover,&amp;nbsp;mouseenter:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;마우스가&amp;nbsp;해당&amp;nbsp;영역&amp;nbsp;위로&amp;nbsp;올라갔을&amp;nbsp;때&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#bulb'&lt;/span&gt;).mouseover(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;console&lt;/span&gt;.log($(this).attr(&lt;span style=&quot;color:#ffd500&quot;&gt;'src'&lt;/span&gt;));&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(this).attr(&lt;span style=&quot;color:#ffd500&quot;&gt;'src'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;'images/bulb_on.gif'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;mouseout,&amp;nbsp;mouseleave:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;마우스가&amp;nbsp;해당&amp;nbsp;영역&amp;nbsp;바깥으로&amp;nbsp;나갔을&amp;nbsp;때&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#bulb'&lt;/span&gt;).mouseout(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(this).attr(&lt;span style=&quot;color:#ffd500&quot;&gt;'src'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;'images/bulb_off.gif'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;hover(handlerIn,&amp;nbsp;handlerOut)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;handlerIn:&amp;nbsp;마우스가&amp;nbsp;해당&amp;nbsp;영역&amp;nbsp;위로&amp;nbsp;올라갔을&amp;nbsp;때&amp;nbsp;처리할&amp;nbsp;이벤트&amp;nbsp;핸들러&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;handlerOut:&amp;nbsp;마우스가&amp;nbsp;해당&amp;nbsp;영역&amp;nbsp;바깥으로&amp;nbsp;나갔을&amp;nbsp;때&amp;nbsp;처리할&amp;nbsp;이벤트&amp;nbsp;핸들러&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;&amp;nbsp;handlerIn()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;console&lt;/span&gt;.log($(&lt;span style=&quot;color:#ffd500&quot;&gt;'p'&lt;/span&gt;).css(&lt;span style=&quot;color:#ffd500&quot;&gt;'background-color'&lt;/span&gt;));&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'p'&lt;/span&gt;).css(&lt;span style=&quot;color:#ffd500&quot;&gt;'background-color'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;'yellow'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;&amp;nbsp;handlerOut()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'p'&lt;/span&gt;).css(&lt;span style=&quot;color:#ffd500&quot;&gt;'background-color'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;'green'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'p'&lt;/span&gt;).hover(handlerIn,&amp;nbsp;handlerOut);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;focus:&amp;nbsp;포커스를&amp;nbsp;받았을&amp;nbsp;때(입력&amp;nbsp;가능한&amp;nbsp;상태)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;blur:&amp;nbsp;포커스를&amp;nbsp;잃었을&amp;nbsp;때&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#userid'&lt;/span&gt;).focus(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(this).css(&lt;span style=&quot;color:#ffd500&quot;&gt;'background-color'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;'lightyellow'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#userid'&lt;/span&gt;).blur(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(this).css(&lt;span style=&quot;color:#ffd500&quot;&gt;'background-color'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;'white'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;change:&amp;nbsp;입력&amp;nbsp;내용이&amp;nbsp;변경됐을&amp;nbsp;때&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#userid'&lt;/span&gt;).change(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;console&lt;/span&gt;.log($(this).val());&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;document.getElementById('userid').value&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(this).val($(this).val().toUpperCase());&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;출력화면&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;- 기능 실행전&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 670px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/222E3E4958EB1DCD15&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F222E3E4958EB1DCD15&quot; width=&quot;670&quot; height=&quot;432&quot; filename=&quot;jquery03.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;b style=&quot;font-size: 14pt;&quot;&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;- 기능 실행후&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 526px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/234DCF4858EB1DE01E&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F234DCF4858EB1DE01E&quot; width=&quot;526&quot; height=&quot;419&quot; filename=&quot;jquery03_1.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>개발자의 길/jQuery</category>
      <category>Event</category>
      <category>jQuery</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/111</guid>
      <comments>https://jhmocu.tistory.com/111#entry111comment</comments>
      <pubDate>Mon, 10 Apr 2017 14:53:50 +0900</pubDate>
    </item>
    <item>
      <title>jQuery 기본 문법</title>
      <link>https://jhmocu.tistory.com/110</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;jQuery의 기본문법&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- jQuery의 기본 문장 : $('selector').action();&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- $('selector'): HTML 요소를 찾음. CSS 선택자(태그, 클래스, 아이디);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- &amp;nbsp; action(): 해당 HTML 요소에 행해질 동작(기능)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;02_syntax.html&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;35&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;36&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;37&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;38&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;39&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;40&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;41&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;42&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;43&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;44&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;45&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;!DOCTYPE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;meta&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;charset&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;jQuery&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;https://code.jquery.com/jquery-3.2.1.min.js&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;jQuery&amp;nbsp;기본&amp;nbsp;문법&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;button&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;btn1&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;모두&amp;nbsp;숨기기&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;button&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;btn2&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;클래스&amp;nbsp;숨기기&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;button&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;btn3&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;아이디&amp;nbsp;숨기기&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;button&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;단락&amp;nbsp;1&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;c1&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;단락&amp;nbsp;2,&amp;nbsp;클래스&amp;nbsp;c1&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;c1&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;단락&amp;nbsp;3,&amp;nbsp;클래스&amp;nbsp;c1&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;p1&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;단락&amp;nbsp;4,&amp;nbsp;아이디&amp;nbsp;p1&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;jQuery의&amp;nbsp;기본&amp;nbsp;문장&amp;nbsp;:&amp;nbsp;$('selector').action();&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;$('selector'):&amp;nbsp;HTML&amp;nbsp;요소를&amp;nbsp;찾음.&amp;nbsp;CSS&amp;nbsp;선택자(태그,&amp;nbsp;클래스,&amp;nbsp;아이디);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;action():&amp;nbsp;해당&amp;nbsp;HTML&amp;nbsp;요소에&amp;nbsp;행해질&amp;nbsp;동작(기능)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;$(&lt;span style=&quot;color:#4be6fa&quot;&gt;document&lt;/span&gt;).ready(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;(){&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#btn1'&lt;/span&gt;).click(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'p'&lt;/span&gt;).hide();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#btn2'&lt;/span&gt;).click(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'.c1'&lt;/span&gt;).hide();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#btn3'&lt;/span&gt;).click(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'#p1'&lt;/span&gt;).hide();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;출력화면&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 425px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/233C273358EB110022&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F233C273358EB110022&quot; width=&quot;425&quot; height=&quot;313&quot; filename=&quot;jquery02.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>개발자의 길/jQuery</category>
      <category>jQuery</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/110</guid>
      <comments>https://jhmocu.tistory.com/110#entry110comment</comments>
      <pubDate>Mon, 10 Apr 2017 13:59:01 +0900</pubDate>
    </item>
    <item>
      <title>jQuery 사용하기</title>
      <link>https://jhmocu.tistory.com/109</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&amp;lt;jQuery 다운로드 및 설정&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;* jQuery 라이브러리를 포함시키는 방법&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;1. http://jquery.com/download/ 페이지에서 jQuery 라이브러리를 다운로드&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre; font-size: 14pt;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;-&amp;gt; WebContent/js 폴더에 복사&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre; font-size: 14pt;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;-&amp;gt; &amp;lt;script&amp;gt; 태그를 사용해서 복사한 js 파일을 html 파일에 포함&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 733px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/236CE73458EAE80C2B&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F236CE73458EAE80C2B&quot; width=&quot;733&quot; height=&quot;371&quot; filename=&quot;jquery01.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;2. CDN(Content Delivery Network)에서 제공하는 링크 주소로 포함&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 733px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/224DE93658EAE82320&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F224DE93658EAE82320&quot; width=&quot;733&quot; height=&quot;353&quot; filename=&quot;jquery01_2.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18.6667px;&quot;&gt;1. http://jquery.com/download/ 페이지에서 jQuery 라이브러리를 다운로드&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18.6667px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;-&amp;gt; WebContent/js 폴더에 복사&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18.6667px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;-&amp;gt; &amp;lt;script&amp;gt; 태그를 사용해서 복사한 js 파일을 html 파일에 포함&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18.6667px;&quot;&gt;2. CDN(Content Delivery Network)에서 제공하는 링크 주소로 포함&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18.6667px;&quot;&gt;&amp;nbsp; &amp;nbsp; -&amp;gt; 링크 주소를 넣는 &amp;lt;script&amp;gt;태그에서 js 코드를 작성하면 안됨!&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18.6667px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;01_setup.html&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;!DOCTYPE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;meta&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;charset&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;jQuery&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;!--&amp;nbsp;방법1&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;!--&amp;nbsp;&amp;lt;script&amp;nbsp;src=&quot;js/jquery-3.2.0.min.js&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;/script&amp;gt;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;!--&amp;nbsp;방법2&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;https://code.jquery.com/jquery-3.2.1.min.js&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;document가&amp;nbsp;다&amp;nbsp;등록된&amp;nbsp;후에&amp;nbsp;실행이&amp;nbsp;되기&amp;nbsp;때문에&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;스크립트를&amp;nbsp;head에서&amp;nbsp;선언해도&amp;nbsp;상관없음&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;$(&lt;span style=&quot;color:#4be6fa&quot;&gt;document&lt;/span&gt;).ready(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#ffd500&quot;&gt;'h2'&lt;/span&gt;).click(&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(this).hide();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;jQuery&amp;nbsp;사용하기&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;h2&lt;/span&gt;&amp;gt;클릭하세요!&amp;nbsp;그럼&amp;nbsp;제가&amp;nbsp;사라집니다.&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;h2&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;h2&lt;/span&gt;&amp;gt;Another&amp;nbsp;h2&amp;nbsp;tag&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;h2&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;출력화면&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 557px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/247E373658EAEDDB46&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F247E373658EAEDDB46&quot; width=&quot;557&quot; height=&quot;262&quot; filename=&quot;jquery01_3.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>개발자의 길/jQuery</category>
      <category>jQuery</category>
      <category>설치</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/109</guid>
      <comments>https://jhmocu.tistory.com/109#entry109comment</comments>
      <pubDate>Mon, 10 Apr 2017 11:29:07 +0900</pubDate>
    </item>
    <item>
      <title>자바스크립트 이벤트(Event) 06</title>
      <link>https://jhmocu.tistory.com/108</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;자바스크립트 Capturing/Bubbling&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- Event Capturing: 이벤트 처리 순서가 부모 요소 -&amp;gt; 자식 요소&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;- Event Bubbling: 이벤트 처리 순서가 자식 요소 -&amp;gt; 부모 요소&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;32_event6.html&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#272727; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#aaa; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;35&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;36&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;37&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;38&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;39&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;40&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;41&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;42&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;43&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;44&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;45&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;46&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;47&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;48&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;49&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;50&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;51&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;52&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;53&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#f0f0f0; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;!DOCTYPE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;meta&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;charset&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;JavaScript&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;style&lt;/span&gt;&amp;gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;div&amp;nbsp;&lt;/span&gt;{&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;border&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;1px&amp;nbsp;solid&amp;nbsp;grey&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;padding&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;20px&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;}&lt;span style=&quot;color:#ff3399&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&amp;nbsp;&lt;/span&gt;{&lt;span style=&quot;color:#4be6fa&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;border&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&amp;nbsp;1px&amp;nbsp;dotted&amp;nbsp;red&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#E083FF&quot;&gt;&lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;style&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;Event&amp;nbsp;Capturing/Bubbling&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;div1&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;p1&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;Event&amp;nbsp;Capturing:&amp;nbsp;부모&amp;nbsp;-&amp;gt;&amp;nbsp;자식&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;div2&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a8ff58&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;p2&quot;&lt;/span&gt;&lt;span style=&quot;color:#a8ff58&quot;&gt;&lt;/span&gt;&amp;gt;Event&amp;nbsp;Bubbling:&amp;nbsp;자식&amp;nbsp;-&amp;gt;&amp;nbsp;부모&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;var&lt;/span&gt;&amp;nbsp;div1&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;document&lt;/span&gt;.&lt;span style=&quot;color:#4be6fa&quot;&gt;getElementById&lt;/span&gt;(&lt;span style=&quot;color:#ffd500&quot;&gt;'div1'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;var&lt;/span&gt;&amp;nbsp;p1&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;document&lt;/span&gt;.&lt;span style=&quot;color:#4be6fa&quot;&gt;getElementById&lt;/span&gt;(&lt;span style=&quot;color:#ffd500&quot;&gt;'p1'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;div1.&lt;span style=&quot;color:#4be6fa&quot;&gt;addEventListener&lt;/span&gt;(&lt;span style=&quot;color:#ffd500&quot;&gt;'click'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;alert&lt;/span&gt;(&lt;span style=&quot;color:#ffd500&quot;&gt;'div입니다!'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;},&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;true&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;p1.&lt;span style=&quot;color:#4be6fa&quot;&gt;addEventListener&lt;/span&gt;(&lt;span style=&quot;color:#ffd500&quot;&gt;'click'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;alert&lt;/span&gt;(&lt;span style=&quot;color:#ffd500&quot;&gt;'p입니다!'&lt;/span&gt;);&amp;nbsp;},&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;true&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;var&lt;/span&gt;&amp;nbsp;div2&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;document&lt;/span&gt;.&lt;span style=&quot;color:#4be6fa&quot;&gt;getElementById&lt;/span&gt;(&lt;span style=&quot;color:#ffd500&quot;&gt;'div2'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;var&lt;/span&gt;&amp;nbsp;p2&amp;nbsp;&lt;span style=&quot;color:#0086b3&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;document&lt;/span&gt;.&lt;span style=&quot;color:#4be6fa&quot;&gt;getElementById&lt;/span&gt;(&lt;span style=&quot;color:#ffd500&quot;&gt;'p2'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;div2.&lt;span style=&quot;color:#4be6fa&quot;&gt;addEventListener&lt;/span&gt;(&lt;span style=&quot;color:#ffd500&quot;&gt;'click'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;alert&lt;/span&gt;(&lt;span style=&quot;color:#ffd500&quot;&gt;'div입니다!'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;},&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;false&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;p2.&lt;span style=&quot;color:#4be6fa&quot;&gt;addEventListener&lt;/span&gt;(&lt;span style=&quot;color:#ffd500&quot;&gt;'click'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;alert&lt;/span&gt;(&lt;span style=&quot;color:#ffd500&quot;&gt;'p입니다!'&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;event&lt;/span&gt;.stopPropagation();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&amp;nbsp;&lt;span style=&quot;color:#c10aff&quot;&gt;false&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(79, 79, 79);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&amp;lt;출력화면&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 537px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2346A74C58E745BC1D&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2346A74C58E745BC1D&quot; width=&quot;537&quot; height=&quot;324&quot; filename=&quot;js32.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>개발자의 길/Javascript</category>
      <category>Event</category>
      <category>JavaScript</category>
      <author>모쿠</author>
      <guid isPermaLink="true">https://jhmocu.tistory.com/108</guid>
      <comments>https://jhmocu.tistory.com/108#entry108comment</comments>
      <pubDate>Fri, 7 Apr 2017 16:54:41 +0900</pubDate>
    </item>
  </channel>
</rss>