@@steffen:
<a href="#" onClick="change_img("./Objektfotos/6224/0_PIR_1_Eingang.jpg");">text</a>
▲ ▲
Hier beginnt der Attributwert. Hier endet er. Wohl nicht das, was du willst.
Du kannst einfache Anführungszeichen innerhalb von doppelten verwenden oder auch andersrum; oder maskieren.
Die funktion schaut natürlich so aus:
function change_img(newurl){
document.getElementByID['skizze'].firstChild.src = newurl;
}
Was heißt hier „natürlich“?? Warum beachtest du die schon gegebenen Hinweise nicht?
<div id="skizze"><img src="./Objektfotos/6224/4_Objektskizze__.jpg" style="width: 420px;"></div>
'alt'-Attribut fehlt.
Live long and prosper,
Gunnar
--
“New Jersey Hall of Fame? […] But then I ran through the list of names: Albert Einstein, Bruce Springsteen... my mother's going to like that. […] it's the only time she's going to hear those two names mentioned in the same sentence, so I'm going to enjoy it.” (Bruce Springsteen when inducted into the New Jersey Hall of Fame, 2008-05-04)
“New Jersey Hall of Fame? […] But then I ran through the list of names: Albert Einstein, Bruce Springsteen... my mother's going to like that. […] it's the only time she's going to hear those two names mentioned in the same sentence, so I'm going to enjoy it.” (Bruce Springsteen when inducted into the New Jersey Hall of Fame, 2008-05-04)