わかりました、javascript ロールオーバーがあります。clicked3 の画像を最初に選択したいのですが、それをロールオーバーするか、他の画像をロールオーバーすると、clicked3 の選択が解除されます。私のhtmlの画像IDは、clicked1、clicked2、clicked3、clicked4です。このコードを実行しましたが、機能しません。ピクチャ 1 のロールオーバーが機能しておらず、ピクチャ 3 が選択されていないようです...何か助けはありますか?
window.onload=function() {
var domClicked1=document.getElementById("clicked1");
var domClicked2=document.getElementById("clicked2");
var domClicked3=document.getElementById("clicked3");
var domClicked3=document.getElementById("clicked4");
clicked1.call(domClicked1);
clicked2.call(domClicked2);
clicked3.call(domClicked3);
clicked4.call(domClicked4);
domClicked1.onmouseover=handleOver1;
domClicked2.onmouseover=handleOver2;
domClicked3.onmouseover=handleOver3;
domClicked3.onmouseover=handleOver4;
domClicked1.onmouseout=handleOut1;
domClicked2.onmouseout=handleOut2;
domClicked3.onmouseout=handleOut3;
domClicked4.onmouseout=handleOut4;
}
function clicked1(){
this.style.backgroundPosition = "0px top";
}
function handleOver1() {
this.style.backgroundPosition = "-198px top";
}
function handleOut1() {
this.style.backgroundPosition = "-198px top";
}
function clicked3(){
this.style.backgroundPosition = "-198px top";
}
function handleOver3() {
this.style.backgroundPosition = "-198px top";
}
function handleOut3() {
this.style.backgroundPosition = "0px top";
}