Notice
Recent Posts
Recent Comments
Today
Total
05-02 00:04
Archives
관리 메뉴

Jeongchul Kim

Eclipse Webserver + HTML Project 본문

Computer Language

Eclipse Webserver + HTML Project

김 정출 2016. 2. 22. 10:51


Eclipse Webserver + HTML Project


Eclipse Webserver , New Html 파일 만들기


설치한 webserver에 html 파일을 생성하고 javascript를 만들어본다.

1. New -> Other

2. Wizards에 html을 입력한다.


3. webserver/public을 선택한다.


4. New html file (5) 를 선택한다.


public 폴더 안에 있어야 합니다.


first.html 파일


<!DOCTYPE html>

<html>

<head>

<meta charset="EUC-KR">

<title>Insert title here</title>

</head>

<body>

<h1>First HTML</h1>

</body>

</html>




second.html

<!DOCTYPE html>

<html>

<head>

<meta charset="EUC-KR">

<title>Insert title here</title>

</head>

<body>

<h1>Second HTML</h1>

<a href="first.html">Goi first html</a>

</body>

</html>


<scr을 입력하고 ctrl+space를 입력하면 자동으로 완성된다.

<!DOCTYPE html>

<html>

<head>

<meta charset="EUC-KR">

<title>Insert title here</title>

<script type="text/javascript">

var i = 10;

function f() {

console.log("This is function f");

}

console.log(i);

f();

</script>

</head>

<body>

<h1>Second HTML</h1>

<a href="first.html">Go first html</a>

</body>

</html>


웹 브라우저에서 ctrl + R을 눌러 새로 고침한다.


웹 브라우저의 메뉴에서 도구 더보기 -> 개발자 도구(ctrl+shift+i)를 선택한다.


dock to bottom으로 한다.



메뉴에서 console를 선택하여 console을 확인 할 수 있다.

디버그로 alert를 이용해서 확인할 수도 있다.

<!DOCTYPE html>

<html>

<head>

<meta charset="EUC-KR">

<title>Insert title here</title>

<script type="text/javascript">

var i = 10;

function f() {

console.log("This is function f");

}

console.log(i);

f();

alert(i);

</script>

</head>

<body>

<h1>Second HTML</h1>

<a href="first.html">Go first html</a>

</body>

</html>









'Computer Language' 카테고리의 다른 글

NodeJs - 모듈(FileSystem, Event, Network)  (0) 2016.02.23
NodeJs  (0) 2016.02.23
Eclipse Web 툴 및 webserver 설치하기  (0) 2016.02.22
Eclipse에서 Node.js와 JavaScript 실행하기  (0) 2016.02.22
C언어 변수 Variable  (0) 2016.02.18
Comments