Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
임준석 committed Jul 25, 2014
1 parent 407fbe5 commit 4ff4808
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
Binary file added homework1/First_HOMEWORK.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions homework1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<h2> 과제 1 </h2>

<ul>
<li>1. 인풋창에 글을 입력하면 아래의 ul에 목록 추가하기</li>
<li>2. 엔터키를 눌러도 입력되게 하기</li>
</ul>

,,,html
<div class="content">
<html>
<head lang="en">
<meta charset="UTF-8">
<title>First HOMEWORK</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">

<script type="application/javascript" src="http://code.jquery.com/jquery-1.11.1.js"></script>
<script type="application/javascript" src="http://underscorejs.org/underscore.js"></script>
<script type="application/javascript" src="http://backbonejs.org/backbone.js"></script>
<script type="application/javascript" src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

<style>
.content{
width : 500px;
margin : 50px auto;
}

.list{
margin-top:20px;
}

#enterNewWork{
width:400px;
}

</style>
</head>
<body>
<div class="content">

<h2>WORK LIST</h2>

<div class="form-inline">
<div class="form-group">
<input type="text" class="form-control" id="enterNewWork" placeholder="Enter NEW WORK" autocomplete="off">
</div>
<button type="button" class="btn btn-default" id="addButton">Add</button>
</div>

<ul class="list"></ul>

</div>
<script type="text/javascript">
// 스크립트를 작성하세요!!
</script>
</body>
</html>
,,,
63 changes: 63 additions & 0 deletions homework1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>First HOMEWORK</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">

<script type="application/javascript" src="http://code.jquery.com/jquery-1.11.1.js"></script>
<script type="application/javascript" src="http://underscorejs.org/underscore.js"></script>
<script type="application/javascript" src="http://backbonejs.org/backbone.js"></script>
<script type="application/javascript" src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

<style>
.content{
width : 500px;
margin : 50px auto;
}

.list{
margin-top:20px;
}

#enterNewWork{
width:400px;
}

</style>
</head>
<body>
<div class="content">

<h2>WORK LIST</h2>

<div class="form-inline">
<div class="form-group">
<input type="text" class="form-control" id="enterNewWork" placeholder="Enter NEW WORK" autocomplete="off">
</div>
<button type="button" class="btn btn-default" id="addButton">Add</button>
</div>

<ul class="list"></ul>

</div>
<script type="text/javascript">

var input = $("#enterNewWork");
var button = $("#addButton");

input.on("keydown" , function(e){
if(e.keyCode == 13){
button.click();
}
});

button.click(function(e){
$(".list").append("<li>" + input.val() + "</li>");
input.val("");
});


</script>
</body>
</html>

0 comments on commit 4ff4808

Please sign in to comment.