在我的应用程序中,我border image在css中使用,但它在Opera中不起作用.那么Opera怎么能支持呢?
我使用了sizzle的例子,我在最后一个代码中得到了window.onload.
这意味着什么.
我的代码是这样的:
var init = function () {
var trail = Sizzle;
var foo = trail('.foo');
foo[0].onmouseover = function () {
this.style.backgroundColor = (this.style.backgroundColor.indexOf('blue') === 0) ? 'yellow' : 'blue';
};
foo[1].onmouseover = function () {
this.style.backgroundColor = (this.style.backgroundColor.indexOf('red') === 0) ? 'yellow' : 'red';
jQuery(foo[1]).after("<b>Hello</b>");
}
foo[2].onmouseover = function () {
this.style.backgroundColor = (this.style.backgroundColor.indexOf('green') === 0) ? 'yellow' : 'green';
jQuery(foo[3]).toggle("slow");
jQuery('b').remove();
}
};
window.onload = init;
Run Code Online (Sandbox Code Playgroud)
这是什么意思?