that's too easyyy
This commit is contained in:
parent
b1c5fe657f
commit
4c36c2b209
2 changed files with 8 additions and 1 deletions
|
@ -5,10 +5,12 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Prog Web Legend</title>
|
||||
<script> alert("click")</script>
|
||||
<link rel="stylesheet" href="" id="link-css">
|
||||
</head>
|
||||
<body>
|
||||
<script src="./js/intro.js" deref></script>
|
||||
<script src="./js/element.js"></script>
|
||||
<script src="./js/technologie.js"></script>
|
||||
<div id="divButton_score">
|
||||
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@ class Technologie{
|
|||
fetch("../bdd/arbre.json").then((data)=>{
|
||||
data.json().then((data)=>{
|
||||
console.log(data)
|
||||
this.props = data[this.nom]
|
||||
this.props = data["technologies"][this.nom]
|
||||
this.cout = this.props.cout
|
||||
this.boost = this.props.boost
|
||||
})
|
||||
|
@ -15,4 +15,9 @@ class Technologie{
|
|||
})
|
||||
}
|
||||
|
||||
appliquer_amelioration_style(){
|
||||
document.getElementById("link-css").setAttribute("href","css/"+this.props.css_id)
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in a new issue