Situatie
Cu jQuery, puteți afișa elemente HTML ascuns cu metoda show():
Solutie
Pasi de urmat
<!DOCTYPE html>
<html>
<head>
<script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js”></script>
<script>
$(document).ready(function(){
$(“#afișează”).click(function(){
$(“p”).show();
});
});
</script>
</head>
<body>
<p style=”display:none”>Ai apăsat! Ai apăsat! Tu chiar ai apăsat butonul!</p>
<button id=”afișează”>Afișează</button>
</body>
</html>
Leave A Comment?