GGB数学云 GGB+JS样例12 - 自行车动画

GGB+JS样例12 - 自行车动画

2016年11月22日 人阅读 GeoGebra»GGB+JS样例

摘要: 本文介绍基于GeoGebra和JavaScript的小程序样例 - 自行车动画,显示重置和播放按钮。

网页代码:

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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>自行车动画,显示重置和播放按钮</title>
</head>
<body>
<div id="applet"></div>
<script src="../GeoGebra/deployggb.js"></script>
<script>
var applet = new GGBApplet({
showResetIcon: true,
showAnimationButton: true,
ggbBase64: 'UEsDBBQACAAIACKnfjwAAAAAAAAAAAAAAAAMAAAAZ2VvZ2VicmEueG1s7V3rctvIcv6d8xQs/ciP1NHsdM+9Yu8pyb' +
'e1V7Jsy5cqpVKnKBKSaFOklqS8lp8qySPkAfJM6cGFIggQ4vAiA/K6bEsEQRDo7u+b7p7umUf/+HbZb32NRuPecPB4BxjfaUWDzrD' +
'bG5w/3rmenO3anX/8+rdH59HwPDodtVtnw9Fle/J4RzDc8ceve7/+7V8ejS+Gf7ba/fiUj73oz8c7Z+3+ONppja9GUbs7voiiSe54' +
'+/pbr99rj26OTj9Hncn49o3kIi8HV9f0LZPRNR3rXHYPeuPs5S/xF171e5Onva+9bjRq9Yedxzta0a3Tbx+j0aTXafcf70ieHMHHO' +
'zj3Jh0S/t2L4aj3fTiY+NNvL35GR1qtce97RBJBf+zRL/GDPoquO/1et9ce+IeJ74NOarX+7HUnF493jHJ0yah3fkH3Kp1MrtYZDk' +
'fd45vxJLpsfTuJRsPHO7uSoUEnteYaBVcad1o3yVtKSAaouRHGaSuNIhnSDdOd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VuXGS8JfybTgx4weP5X2IS8zMXjVHs12IjeHIGtVDS8UI4om38U5Iut477T5kjZQ1m/sjVpwETflZaXxwiN' +
'ZeWIHv0XID+JgspLBmN6Ir+Vfn0fD8+h01P71/wFQSwcIRRmK0QAXAABo6AAAUEsBAhQAFAAIAAgAIqd+PEUZitEAFwAAaOgAAAwA' +
'AAAAAAAAAAAAAAAAAAAAAGdlb2dlYnJhLnhtbFBLBQYAAAAAAQABADoAAAA6FwAAAAA='
});
applet.setHTML5Codebase('../GeoGebra/HTML5/5.0/web/', true);
window.onload = function() {
applet.inject('applet', 'html5');
};
</script>
</body>
</html>
分享到: 更多