0

How to replace a name for a JavaScript code? or a name for a php code.

??

30th Dec 2017, 9:59 PM
Jardiel Santos
Jardiel Santos - avatar
2 Réponses
+ 2
To replace a name in Html using JavaScript: Try following in CodePlayground Html: <div>Welcome <span id="name">John</span></div> JavaScript: var name=prompt ("Enter your name."); window.onload = function() { document.getElementById("name").innerText = name; }
31st Dec 2017, 12:27 AM
Calviղ
Calviղ - avatar
0
I have a website where there is a specific name in almost half of the website's pages but it's without id, but with a div so I wanted to change this specific name and put a JavaScript code instead or a Php File.
31st Dec 2017, 12:30 AM
Jardiel Santos
Jardiel Santos - avatar