DOCTYPE html html head lang en meta charset UTF-8 title Hello Kotlin t

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Hello Kotlin!</title>
<style>
.background-blue {
background: #5D9CEC;
}
.background-green {
background: #8CC152;
}
</style>
</head>
<body>
<h1>Hello Kotlin!</h1><br/>
<div id="container"></div><br/>
<div id="kotlinCallContainer"></div><br/>
<input id="btn" type="button" value="Hide blue container" />
<input id="btnNativeCall" type="button" value="Call Native Object JavaScript Object" />
<input id="btnJsCall" type="button" value="Call Kotlin From JavaScript" onclick="updKotlinCallContainer()" />
<script src="js/lib/jquery-1.10.1.min.js"></script>
<script src="js/lib/kotlin.js"></script>
<script src="js/lib/nativetest.js"></script>
<script src="js/app/HelloKotlin2Js.js"></script>
<script>
function updKotlinCallContainer() {
Kotlin.modules.HelloKotlin2Js.hello.callFromJs("Here is call Kotlin from JavaScript ;)");
}
</script>
</body>
</html>