Answer the question
In order to leave comments, you need to log in
How to add and check for cookies?
I have a website that displays a click object when accessed.
The main object is also hidden by default.
After clicking on click, click is hidden and main is shown.
#main {
display: none;
}
function FuncImages() {
document.getElementById("main").style.display = "block";
document.getElementById("click").style.display = "none";
}
<div id = "main">Данные</div>
<div id = "click" onclick = "FuncImages()">Здесь картинка</div>
Answer the question
In order to leave comments, you need to log in
PHP:
This is a setup.
PHP:
if (isset($_COOKIE["name"])) {
// Какие-то действия
}
Didn't you ask the same question yesterday? → How to check for cookies and perform a specific action?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question