“Comment modifier le texte du paragraphe sur Click dans Java Scriopt” Réponses codées

Comment modifier le texte du paragraphe sur Click dans Java Scriopt

<!DOCTYPE html>
<html>
<body>

<p>When you click a button it will change the text of sample paragraph.</p>

<p id="demo">I am sample paragraph.</p>

<button onclick="change_text()">Click me</button>

<script>
function change_text(){
    document.getElementById("demo").innerHTML = "You clicked the button, I am new paragraph.";
}
</script>

</body>
</html>
R

Comment modifier le texte du paragraphe sur Click dans Java Scriopt

<!DOCTYPE html>
<html>
<body>

<p>When you click a button it will change the text of sample paragraph.</p>

<p id="demo">I am sample paragraph.</p>

<button onclick="change_text()">Click me</button>

<script>
function change_text(){
    document.getElementById("demo").innerHTML = "You clicked the button, I am new paragraph.";
}
</script>

</body>
</html>
R

Comment modifier le texte du paragraphe sur Click dans Java Scriopt

<!DOCTYPE html>
<html>
<body>

<p>When you click a button it will change the text of sample paragraph.</p>

<p id="demo">I am sample paragraph.</p>

<button onclick="change_text()">Click me</button>

<script>
function change_text(){
    document.getElementById("demo").innerHTML = "You clicked the button, I am new paragraph.";
}
</script>

</body>
</html>
R

Comment modifier le texte du paragraphe sur Click dans Java Scriopt

<!DOCTYPE html>
<html>
<body>

<p>When you click a button it will change the text of sample paragraph.</p>

<p id="demo">I am sample paragraph.</p>

<button onclick="change_text()">Click me</button>

<script>
function change_text(){
    document.getElementById("demo").innerHTML = "You clicked the button, I am new paragraph.";
}
</script>

</body>
</html>
R

Réponses similaires à “Comment modifier le texte du paragraphe sur Click dans Java Scriopt”

Questions similaires à “Comment modifier le texte du paragraphe sur Click dans Java Scriopt”

Plus de réponses similaires à “Comment modifier le texte du paragraphe sur Click dans Java Scriopt” dans JavaScript

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code