<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>js控制点动画</title>
</head>
<body>
<button onclick="switchPoint()">换一个点</button>
<div id="applet1"></div>
<script src="../GeoGebra/deployggb.js"></script>
<script>
var name = 'C';
var applet = new GGBApplet({filename: '2d.ggb', appletOnLoad: function() {
ggbApplet.setAnimating(name, true);
ggbApplet.startAnimation();
}});
applet.setHTML5Codebase('../GeoGebra/HTML5/5.0/web/', true);
window.onload = function() {
applet.inject('applet1', 'html5');
};
function switchPoint() {
ggbApplet.setAnimating(name, false);
name = name === 'C' ? 'D' : 'C';
ggbApplet.setAnimating(name, true);
ggbApplet.startAnimation();
}
</script>
</body>
</html>