"debut td2"
This commit is contained in:
3
TD2/README.MD
Normal file
3
TD2/README.MD
Normal file
@ -0,0 +1,3 @@
|
||||
# Programmation Web – client riche - TD2
|
||||
|
||||
## Exercice 1
|
42
TD2/css/main.css
Normal file
42
TD2/css/main.css
Normal file
@ -0,0 +1,42 @@
|
||||
body {
|
||||
font-family: serif;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3 {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
background-color: #def;
|
||||
padding: 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.h {
|
||||
background-color: #abc;
|
||||
padding: 10px;
|
||||
margin-left: 60px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
background-color: #789;
|
||||
padding: 10px;
|
||||
margin-left: 110px;
|
||||
}
|
||||
|
||||
div {
|
||||
background-color: #ddd;
|
||||
padding: 20px;
|
||||
margin-left: 110px;
|
||||
}
|
||||
|
||||
p {
|
||||
background-color: #eee;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.pink {
|
||||
background-color: pink;
|
||||
}
|
21
TD2/index.html
Normal file
21
TD2/index.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name='author' content="JunkJumper" />
|
||||
<meta charset='utf-8' />
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
|
||||
<title>M4103 - Programmation Web Client Riche - TD1</title>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1' />
|
||||
<meta name="description" content="Page TD1 M413" />
|
||||
<meta name="keywords" content="JavaScript, TD1" />
|
||||
<link rel='stylesheet' type='text/css' media='screen' href='./css/main.css'>
|
||||
<script src='./js/main.js'></script>
|
||||
<p>Comme pour tous les autres td, les réponses aux questions sont disponibles <strong><a href="https://github.com/JunkJumper/M4103-Programmation-Web-Client-Riche/tree/master/TD1" target="_blank">ICI</a></strong> !</p>
|
||||
</head>
|
||||
|
||||
<body onload="init();">
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
10
TD2/js/main.js
Normal file
10
TD2/js/main.js
Normal file
@ -0,0 +1,10 @@
|
||||
function initSelection() {
|
||||
document.body.addEventListener("click", selection);
|
||||
}
|
||||
|
||||
function selection(event) {
|
||||
console.log(event.target.tagName);
|
||||
var element = event.target;
|
||||
element.classList.toggle("pink");
|
||||
|
||||
}
|
Reference in New Issue
Block a user