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
|
<html>
<head>
<title>JSXGraph example</title>
<link rel="stylesheet" type="text/css" href="../distrib/jsxgraph.css" />
<script type="text/javascript" src="/javascript/prototype/prototype.js"></script>
<script type="text/javascript" src="../distrib/jsxgraphcore.js"></script>
</head>
<body>
<h2>Multiple boards</h2>
<div id="jxgbox1" class="jxgbox" style="width:600px; height:400px;"></div>
<div id="jxgbox2" class="jxgbox" style="width:600px; height:400px;"></div>
<div id="debug" style="display:block;"></div>
<script type="text/javascript">
/* <![CDATA[ */
b1 = JXG.JSXGraph.initBoard('jxgbox1', {originX: 250, originY: 250, unitX: 50, unitY: 25});
s = b1.createElement('slider', [[0,0],[5,0],[-5,0,5]]);
b2 = JXG.JSXGraph.initBoard('jxgbox2', {originX: 250, originY: 250, unitX: 50, unitY: 25});
a = b2.createElement('point', [function(){return s.Value();},function(){return s.Value();}]);
/* ]]> */
</script>
<form>
<input type="button" value="add board2 to board1" onClick="b1.addChild(b2)">
<input type="button" value="remove board2 from b1" onClick="b1.removeChild(b2)">
</form>
</body>
</html>
|