【笔记】判断宽度跳转

$(window).resize(function(){
var wWidth = screen.width;
if( wWidth < 788 ){
window.location.href="http://www.baibu.com"
}
})

<script type="text/javascript">
$(window).resize(function(){

})
var wWidth = screen.width;
if( wWidth < 768 ){
window.location.href="http://m.web72-38318.59.xiniuyun.com"
}
</script>

猜你喜欢

转载自www.cnblogs.com/zohn/p/11042102.html