<!doctype html> // doctype 선언

<html>

<head>

<meta charset="utf-8">

<title>logic</title>

        <style>

div{width:100px; height:100px}

.m1{background:red;}

.m2{background:blue; position:relative; top:-50px; left:50px;}

.m3{background:yellow;}

</style>

        <script>

var sachik;  // 변수선언

sachik = 5+2*9;  // 변수에 들어갈 수식

console.log(sachik);  // console 창에 변수가 표시

var bigyo;

bigyo = 4<2;

console.log(bigyo);

var nonri;

nonri = 30<10 && 20<40;

console.log(nonri);

var bokhab;

var a = 10;

bokhab = a *= 3;

console.log(bokhab);

var b = 11;

b++;

console.log(b);

b--;

console.log(b);

</script>

</head>

    <body>

</body>

</html>




=== 결과창 ===




' > JavaScript' 카테고리의 다른 글

(16.5.26) document.write , prompt  (0) 2016.05.26
(16.5.26) 함수  (0) 2016.05.26
(16.5.26) 박스겹치기-div활용  (0) 2016.05.26

+ Recent posts