- $(Windows).bind("load resize",function(){
- document.documentElement.clientWidth>= 600 ? console.log("hello") : console.log("xiaoyu600")
- });
- // 第二种
- $(Windows).bind("load resize",function(){
- if(document.documentElement.clientWidth>= 600) console.log("hello111")
- });
来源: http://www.bubuko.com/infodetail-3109696.html