Difference between revisions of "Point"
From JSXGraph Wiki
Jump to navigationJump to searchLine 2: | Line 2: | ||
It is produced by the following commands: | It is produced by the following commands: | ||
<source lang="xml"> | <source lang="xml"> | ||
+ | <div id="jxgbox" class="jxgbox" style="width:500px; height:200px; float:left; "></div> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
var board = JXG.JSXGraph.initBoard('jxgbox', {originX: 200, originY: 100, unitX: 50, unitY: 50}); | var board = JXG.JSXGraph.initBoard('jxgbox', {originX: 200, originY: 100, unitX: 50, unitY: 50}); | ||
Line 7: | Line 8: | ||
</script> | </script> | ||
</source> | </source> | ||
− | + | The JabvaScript code has to be placed AFTER the div element which will contain the construction. | |
+ | From now on, we will only show the JavaScript code. | ||
<html> | <html> | ||
<link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" /> | <link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" /> |
Revision as of 11:26, 17 September 2008
This example shows how to construct a simple, draggable point. It is produced by the following commands:
<div id="jxgbox" class="jxgbox" style="width:500px; height:200px; float:left; "></div>
<script type="text/javascript">
var board = JXG.JSXGraph.initBoard('jxgbox', {originX: 200, originY: 100, unitX: 50, unitY: 50});
var p = board.createElement('point',[1,1]);
</script>
The JabvaScript code has to be placed AFTER the div element which will contain the construction. From now on, we will only show the JavaScript code. <html> <link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" /> <script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/prototype.js"></script> <script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraphcore.js"></script>
<script type="text/javascript">
var board = JXG.JSXGraph.initBoard('jxgbox', {originX: 200, originY: 100, unitX: 50, unitY: 50}); var p = board.createElement('point',[1,1]);
</script>