开发者

Make elements "known" to functions in JavaScript before assignment

I am writing a page using JavaScript, and I have 4 divs, all of which are from the same class. Each div has a function that changes the styles of the other divs (border colour and background colour, for example). The problem is t开发者_StackOverflowhat the last div does not get affected by the functions of the divs above it, because it was not "assigned" yet. Is there any way to fix this?


window.onload = function() {

};

Make sure you run your code when the window has completely loaded.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜