Комментарии:
Why would I add text with JS if could do it with HTML ?! I'm looking to add a caret on click so client can add their text on the window
ОтветитьThat was concise and helpful. keep it up
ОтветитьHI
i have Q about javascript! specifically the appending part!
when i type the code:
<button id="textappender">click here!</button>
<div id="add">everything is...<div>
.........................................................
document.getElementById("textappender").onclick=function(){
document.getElementById("add").innerHTML=
document.getElementById("add").innerHTML + "awesome!";
}
i got the word "awesome"over and over
like:
(everything is..."awesome!"awesome!"awesome!"awesome!"awesome!"awesome!"awesome!.)
how can i make it shows only once!
can you help please ^^?