ich habe eine Frage, wie kann man unendlich viele <span> einfügen, damit es funktioniert?
Zurzeit kann man das nur auf einer anwenden und die andere beiden bleiben bei localhost...
HTML Code:
<input type="button" value="localhost" class="pText" onclick="changeText('localhost');"/> <input type="button" value="jeder" class="pText" onclick="changeText('%');"/>
HTML Code:
<span id="pText">localhost</span> <span id="pText">localhost</span> <span id="pText">localhost</span>
PHP Code:
function changeText(text) {
document.getElementById('pText').innerHTML=text;
}






