$(document).ready(function () {
if ((screen.width >= 1024) && (screen.height >= 768)) {
alert('Screen size: 1024x768 or larger');
$("link[rel=stylesheet]:not(:first)").attr({
href: "style2.css"
});
} else {
alert('Screen size: less than 1024x768, 800x600 maybe?');
$("link[rel=stylesheet]:not(:first)").attr({
href: "style1.css"
});
}
});
我没有得到这部分:$("link[rel=stylesheet]:not(:first)").attr