窗口更改时是否会触发跨浏览器窗口更改事件?我想要做的是在注入文本后检测窗口是否太宽:
HTML页面是空白的,然后我注入了这个
$("body").append("cdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscscdscsdcsdcsdcsdcscs");`
页面太宽,我想要一个事件发生,所以我尝试了这个,但它没有用?
$(window).change(function () {
alert('test');
//is the window too wide then --------- do this
});
我该如何解决这个问题?