Strings | Sololearn: Learn to code for FREE!

+1

Strings

How to add a string into a paragraph With a function

5/5/2020 11:22:05 AM

RED x

6 Answers

New Answer

+3

RED x You should ask with proper question. There is so many types to insert String in any tag. 1 :- document.getElementById("tag_id"). innerHTML = "ABC"; 2 :- $("#tag_id").html("ABC"); 3 :- $("#tag_id").text("ABC"): 4 :- $(".className").html("ABC");

+2

Use: document.getElementById('myid').innerHTML = "my added string";

+1

<p>ABC</p> just like this

0

I mean with a function

0

Thank you all