07/06/23 12:21:21 fEmCbeMN
>>283
HTML要素にはimg1しかない上、そのFunctionを読み込まなければ一見正常なのだが
そのFunctionが何をするのか分からないためエラーを直したい
ちなみにスクリプト全体としてはそのFunctionの上にもう一つ。
function changeVisibility(displayid, source, otherids) {
var displayelement = document.getElementById('element' + displayid);
var imgelement = document.getElementById('img' + displayid);
if(imgelement.name == 'open') {
displayelement.style.display = 'block';
document.getElementById('img' + displayid).name = 'close';
document.getElementById('img' + displayid).src = source + 'minus.gif';
if(otherids.length)
closeElements(source, otherids);
}
else {
displayelement.style.display = 'none';
document.getElementById('img' + displayid).name = 'open';
document.getElementById('img' + displayid).src = source + 'plus.gif';
}
}