محمد
محمد
KPCKevin Powell - Community
Created by محمد on 10/10/2024 in #back-end
PHP Laravel SQL setup problem
No description
22 replies
KPCKevin Powell - Community
Created by محمد on 9/16/2024 in #front-end
weird react problem
No description
14 replies
KPCKevin Powell - Community
Created by محمد on 7/14/2024 in #front-end
my selector is not returning a value
why when i select a value it doesn't return anything even though i did what i supposed to do
<!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="/test.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Cairo:[email protected]&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
</head>
<body>
<select name="" id="fontSizes">

</select>
<script src="/test.js"></script>
</body>
</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="/test.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Cairo:[email protected]&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
</head>
<body>
<select name="" id="fontSizes">

</select>
<script src="/test.js"></script>
</body>
</html>
function fontSizesFunc() {
let myFontSizes = document.querySelector("#fontSizes")
for (let i = 16; i <= 32; i++) {
let divCreation = document.createElement("option");
divCreation.textContent = `${i}px`
divCreation.value = `${i}px`
myFontSizes.append(divCreation)
}
document.body.style.fontSize = (myFontSizes.onInput = () => myFontSizes.value)
}

fontSizesFunc()
function fontSizesFunc() {
let myFontSizes = document.querySelector("#fontSizes")
for (let i = 16; i <= 32; i++) {
let divCreation = document.createElement("option");
divCreation.textContent = `${i}px`
divCreation.value = `${i}px`
myFontSizes.append(divCreation)
}
document.body.style.fontSize = (myFontSizes.onInput = () => myFontSizes.value)
}

fontSizesFunc()
31 replies
KPCKevin Powell - Community
Created by محمد on 6/30/2024 in #front-end
Weird code function
i have a problem with the i < (long code) the problem is it doesn't take the number so for example if a put it to i < 4 it works but the other way doesn't here's the code: <form action=""> <input type="number" name="elements" class="input" placeholder="Number Of Elements" /> <input type="text" name="texts" class="input" placeholder="Elements Text" /> <select name="type" class="input"> <option value="Div">Div</option> <option value="Section">Section</option> </select> <input type="submit" name="create" value="Create" /> <div class="results"></div> </form>
let numberOfElements = document.querySelector("[name='elements'")
let elementsText = document.querySelector(`[name='texts'`)
let elementsType = document.querySelector("[name='type'")
let createBtn = document.querySelector("[name='create'")
let results = document.querySelector(".results")
// Creation

let valueHolder = numberOfElements.addEventListener("input",() => numberOfElements.value)


createBtn.addEventListener("click",function (preventor) {
for (let i = 0 ;i < numberOfElements.addEventListener("input",() => numberOfElements.value) ;i++) {
let divCreation = document.createElement("div")
results.appendChild(divCreation)
}
preventor.preventDefault()
}
)
let numberOfElements = document.querySelector("[name='elements'")
let elementsText = document.querySelector(`[name='texts'`)
let elementsType = document.querySelector("[name='type'")
let createBtn = document.querySelector("[name='create'")
let results = document.querySelector(".results")
// Creation

let valueHolder = numberOfElements.addEventListener("input",() => numberOfElements.value)


createBtn.addEventListener("click",function (preventor) {
for (let i = 0 ;i < numberOfElements.addEventListener("input",() => numberOfElements.value) ;i++) {
let divCreation = document.createElement("div")
results.appendChild(divCreation)
}
preventor.preventDefault()
}
)
36 replies
KPCKevin Powell - Community
Created by محمد on 6/25/2024 in #front-end
array doesn't want to go away
No description
22 replies
KPCKevin Powell - Community
Created by محمد on 6/15/2024 in #front-end
JavaScript Array Question
No description
13 replies
KPCKevin Powell - Community
Created by محمد on 12/9/2023 in #front-end
Font awesome is not working
No description
49 replies
KPCKevin Powell - Community
Created by محمد on 12/18/2022 in #front-end
regExp Question
4 replies
KPCKevin Powell - Community
Created by محمد on 12/1/2022 in #front-end
JavaScript most complicated code
15 replies