Try
2 years ago in HTML
<html>
<script type="text/javascript">
flag=1
function f1()
{
alert("Hehe Jangan Marah ;'D")
}
function f()
{
if(flag==1)
{
Bn.style.top=400
Bn.style.left=300
flag=2
}
else if(flag==2)
{
Bn.style.top=400
Bn.style.left=50
flag=3
}
else if(flag==3)
{
Bn.style.top=370
Bn.style.left=166
flag=1
}
}
</script>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>Meowww~</title>
</head>
<body>
<h1> Hai awak nak tanya sikit</h1>
<img alt="meme" src="https://media.tenor.com/1yK6x9hsVJ0AAAAi/yaseen1.gif" height="200" /><br><br>
<h2 style="#">Awak suka saya tak????</h2>
<div id="By" style="position:absolute; left:64px; top:370px; width:210px;
height:210px;">
<input type="button" value=" TAK " onClick="f1()" />
</div>
<div ID="Bn" style="position:absolute; left:166px; top:370px; width:210px; height:210px;">
<input type="button" value=" YA " onMouseOver="f()" />
</div>
</body>
</html>