Last active
August 29, 2015 14:07
-
-
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).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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