โก3โคโ๐ฅ1๐1๐ฅ1๐1
#challenge
const obj = {
value: 10,
getValue: function () {
return () => this.value;
}
};
const value = 20;
const getValue = obj.getValue();
console.log(getValue());๐2๐2โคโ๐ฅ1๐1๐ฅ1
๐2โก1โคโ๐ฅ1๐ฅ1๐1
#challenge #HTML #CSS #JS
Nima chiqdi? Comment gooโฆ
โ HTML:
โ CSS:
โ JS:
๐ซ Hoziroq obuna bo'ling va do'stlarga ham ulashib qo'ying
โ https://t.me/absJavaScript
Nima chiqdi? Comment gooโฆ
โ HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div id="orange" class="box"></div>
<div id="green" class="box"></div>
<div id="blue" class="box"></div>
<div id="red" class="box"></div>
<div id="yellow" class="box"></div>
<script src="./app.js"></script>
</body>
</html>
โ CSS:
body {
display: flex;
gap: 50px;
}
.box {
width: 100px;
height: 100px;
cursor: pointer;
}
.box:nth-child(1) {
background-color: orange;
border-radius: 100%;
}
.box:nth-child(2) {
background-color: green;
border-radius: 100%;
}
.box:nth-child(3) {
background-color: blue;
border-radius: 100%;
}
.box:nth-child(4) {
background-color: red;
border-radius: 100%;
}
.box:nth-child(5) {
background-color: yellow;
border-radius: 100%;
} โ JS:
let box = document.querySelectorAll('.box')
let body = document.querySelector('body')
for (let i = 0; i < box.length; i++) {
box[i].addEventListener('click', function () {
body.style.background = box[i].id
})
}โก๏ธJavaScript
๐ซ Hoziroq obuna bo'ling va do'stlarga ham ulashib qo'ying
โ https://t.me/absJavaScript
๐2๐2โคโ๐ฅ1โก1
#challenge #quiz #JavaScript #HTML #CSS #JS
9 ta savoldan nechtasi toสปgสปri ?๐ค
๐ซ Hoziroq obuna bo'ling va do'stlarga ham ulashib qo'ying
โ https://t.me/absJavaScript
9 ta savoldan nechtasi toสปgสปri ?๐ค
โก๏ธJavaScript
๐ซ Hoziroq obuna bo'ling va do'stlarga ham ulashib qo'ying
โ https://t.me/absJavaScript
๐2๐2โคโ๐ฅ1โก1๐1
#challenge #snow #JavaScript #absJavaScript #HTML #CSS #JS #winter
Sinab koสปringchi nima chiqar ekan ๐.
Code ๐
Sinab koสปringchi nima chiqar ekan ๐.
Code ๐
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8">
<title>Snow</title>
</head>
<body>
<section class="section">
<div class="section-container">
<img class="section-container-img" href="https://images.app.goo.gl/8ctwMkEr5ZurDYLR6" alt="snow-icon">
<button class="print">Print</button>
</div>
</section>
</body>
</html>
*{
margin: 0;
padding: 0;
}
.section{
padding-top: 75px;
padding-bottom: 75px;
bacground-color: #2BBFFF;
}
.section-container{
margin-left: auto;
margin-right: auto;
width: 1200px;
display: flex;
justify-content: space-between;
}
.section-container-img{
width: 100px;
height: 100px;
}
.print{
padding: 10px;
color: #000;
bacground-color: #FFF;
border-radius: 8px;
border: none;
}let btn = document.querySelector('.print');
btn.addEventListener('click', function(){
print();
});โ2โคโ๐ฅ1๐1๐ฅ1๐1๐1