javascript:
if(screen.width<1024&&screen.hight<768){
}else if(...){}