-
Notifications
You must be signed in to change notification settings - Fork 0
/
jmp.html
54 lines (41 loc) · 876 Bytes
/
jmp.html
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<html>
<head>
<title>add</title>
<style>
#hello{
height:550px;
width:600px;
}
#hworld{
position:relative;
height:50px;
width:160px;
top: 0px
left: 0px
}
</style>
</head>
<body bgColor='green'>
<div id="hello" bgColor="green">
<div id="hworld" class="worlds" bgColor="green" top="200px" left="200px" >HELLO WORLD.....</div>
</div>
<script>
function f1(){
var x=0;
var y=1;
txts.style.top=(op.jumpi(y)).toString()+"px";
txts.style.left=(op.jumpi(x)).toString()+"px";
}
var op;
var txts=document.getElementById("hworld");
fetch("jmp.wasm")
.then(bytes => bytes.arrayBuffer())
.then(mod => WebAssembly.compile(mod))
.then(module => {
let instance = new WebAssembly.Instance(module);
op=instance.exports;
});
setInterval(f1,1000);
</script>
</body>
</html>