Académique Documents
Professionnel Documents
Culture Documents
<html> <!--9PTS-->
<head>
<meta charset=utf-8>
</head>
<body>
<input id="text" type="text" value="Cliquer sur l'un des boutons" /> <!--2pts-->
<script>
var txt=document.getElementById("text");
var f= document.getElementById("focus");
var d= document.getElementById("disable");
if (txt.disabled==true){
txt.disabled=false;
txt.disabled=true;
</script>
</body>
</html>
1
Activité 2
Solution 1 : On n’a pas touché au code HTML
<html>
<script>
</script>
<body>
</body>
</html>
<html>
<body>
</body>
<script>
p=document.getElementById("p1"); console.log(p);
b=document.getElementById("bouton"); console.log(b);
b.addEventListener("click",function(){
});
</script>
</html>
2
Activité 3
<html>
<head>
<meta charset=utf-8>
</head>
<body>
</body>
<script>
var myInput=document.getElementById("myinput");
var myButton=document.getElementById("mybutton");
var myDiv=document.getElementById("mydiv");
myButton.addEventListener("click",function(){
myDiv.appendChild(newText); }
);
/*myInput.addEventListener("change",function(){
myDiv.appendChild(newText);
);*/
</script>
</html>
3
Activité 4 :
Fichier OursPolaire.html
<html>
<head>
<title>OursPolaire</title>
</head>
<body>
<img src="OursPolaire.jpg">
<form>
</form>
</body>
</html>
Fichier OursPolairePrincipal.html
<html>
<head>
</head>
<body>
</body>
<script>
function ouvrirOurs(){
window.clearTimeout(op);
window.open("OursPolaire.html","ours pol","height=350,width=320");}
</script>
</html>