/* dies unser Skript für monopoly_first_page.html ist */kann nicht Onmouseover Ereignis debuggen
var result;
var button;
var image;
var x = 0;
function animation(animatedObject){
var hereObject = animatedObject;
alert(hereObject);
/*setInterval(animate(animatedObject, x), 100);*/
}
function animate(hereObject, x){
alert(x);
if(x == 0){
hereObject.style.width++;
}
else{
hereObject.style.width--;
}
if(hereObject.style.width <= 225){
x = 0;
}
if(hereObject.style.width >= 300){
x = 1;
}
}
function disanimation(animatedObject){
var hereObject = animatedObject;
clearInterval();
}
window.onload = init;
function init(){
result = document.getElementById("result");
button = document.getElementById("button-container");
document.getElementById("button-container").onmouseclick = animation(button);
document.getElementById("button-container").onmouseout = disanimation(button);
alert(button);
alert(button);
}
hallo every one ... dies ist eine meiner Quellcode und ein Anfänger im ... konfrontiert ich ein Problem und es ist, wo ich diese Aussage schrieb:
document.getElementById("button-container").onmouseclick = animation(button);
, wenn die Funktion init beginnt auch Funktion Animation laufen execetues ... aber ich bin sicher, dass im nicht meine Maus über den angegebenen DIV rollen ... , was ist das Problem?
Dank ... Ich glaube, ich völlig verstehen, was mein Problem war – saman