0
How to replace a name for a JavaScript code? or a name for a php code.
??
2 Respostas
+ 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;
}
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.