-
Notifications
You must be signed in to change notification settings - Fork 1
/
index1.html
39 lines (34 loc) · 1.23 KB
/
index1.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
<!DOCTYPE html>
<html lang="en" style="padding: 0px;">
<head>
<title> Braille</title>
<link href="https://fonts.googleapis.com/css?family=Amatic+SC|Raleway:100,200,600,700" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="style_braille.css">
<meta charset="UTF-8">
<script type="text/javascript">
function point_it(event){
pos_x = event.offsetX?(event.offsetX):event.pageX-document.getElementById("pointer_div").offsetLeft;
pos_y = event.offsetY?(event.offsetY):event.pageY-document.getElementById("pointer_div").offsetTop;
document.getElementById("cross").style.left = (pos_x-1) ;
document.getElementById("cross").style.top = (pos_y-15) ;
document.getElementById("cross").style.visibility = "visible" ;
document.pointform.form_x.value = pos_x;
document.pointform.form_y.value = pos_y;
}
</script>
</head>
<body style="padding: 0px; margin: 0px;">
<div class ="header">
<h1 > Braille Web demo </h1>
</div>
<form name="pointform" method="post">
<div id="pointer_div" onclick="point_it(event)" >
<div class = "">
<img class="displayed" src="boston.jpg">
</div>
You pointed on x = <input type="text" name="form_x" size="4" /> - y = <input type="text" name="form_y" size="4" />
</form>
</script>
</form>
</body>
</html>