<!DOCTYPE html>
<html>
<head>
<meta charset = "UTF-8">
<title>Simple OOP in Javasript</title>
<script type ="text/javascript" src = "5-3_simulation.js"></script>
</head>
<body>
<h1>Attack simulation game</h1>
<div id = "ctrlSection">
<input type = "text" id = "humanName"/> Human Name
<button type = "button" onClick = "man.expFull();">Level Up</button>
<br/>
<input type = "text" id = "magicianName"/> Magician Name
<button type = "button" onClick = "woman.expFull();">Level up</button>
<br/>
<button type = "button" onClick = "startWar();" > Start battle </button>
<button type = "button" onClick = "stopWar();" > Stop battle </button>
<button type = "button" onClick = "man.expFull(); woman.expFull();" > Both level up </button>
<br/>
</div>
<div id = "logSection">
<h3>Human battle log</h3>
<div id = "fightlog1" style = "height : 150px; overlow : scroll;"></div>
<h3>Magician battle log</h3>
<div id = "fightlog2" style = "height : 150px; overlow : scroll;"></div>
</div>
</body>
</html>
5-3_SimpleOOPinJavascript.html
'Programming > JavaScript' 카테고리의 다른 글
JavaScript 소스코드 (0) | 2016.12.07 |
---|---|
[JavaScript] 5-3_simulation.js (0) | 2016.12.07 |
[JavaScript] 5-2_Function.js (0) | 2016.12.07 |
[JavaScript] 5-1_OOPBasic.js (0) | 2016.12.07 |
[JavaScript] 5-0_OOPinJavaScript.html (0) | 2016.12.07 |