Skip to content

Instantly share code, notes, and snippets.

@NathaTerrien
Last active August 29, 2015 14:07
Show Gist options
  • Save NathaTerrien/e6226a370fbc4a01d482 to your computer and use it in GitHub Desktop.
Save NathaTerrien/e6226a370fbc4a01d482 to your computer and use it in GitHub Desktop.
Formation 06 -> 10/10/2014 : Excercice JS n°1 : Création module et enrichissement (HTML).
<!DOCTYPE html>
<html>
<head>
<!-- <script src="./Modules/jquery.js"></script> -->
<script src="./20141007_JS_Exercice1.js"></script>
<script type="text/javascript">
function monTest() {
//alert("test");
var toto=new Geometry.Shape();
var monType=toto.getType();
alert(monType);
var tata=new Geometry.Triangle('A','Z',2);
alert(tata.getType() + ', perimetre :' + tata.getPerimetre());
tata=new Geometry.Triangle(10,20,2);
alert(tata.getType() + ', perimetre :' + tata.getPerimetre());
alert(tata.getTypePlus() + ', perimetre :' + tata.getPerimetre());
};
</script>
</head>
<body>
<button onclick="monTest()">Test</button>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment