js判断加载大小页面
2024-10-14 21:46:47
大页面里的js:
<script>
function jmp(){
var w = document.body.clientWidth;
if( w > window.screen.width){
w = window.screen.width;
};
if( w < 1003){
window.location.href="2.html"
};
}
window.onresize = jmp;
jmp();
</script>
小页面里的js:
<script>
function jmp(){
var w = document.body.clientWidth;
if( w > window.screen.width){
w = window.screen.width;
};
if( w > 1003){
window.location.href="1.html"
};
}
window.onresize = jmp;
jmp();
</script>
最新文章
- saltstsck执行sls配置
- 38、重新复习javascript之三
- 问题解决The connection to adb is down, and a severe error has occured.
- Redis操作的封装类
- 转 DevExpress-ASPxPageControl 动态添加 TabPage 内容
- C#中Predicate<;T>;与Func<;T, bool>;泛型委托的用法实例
- [译]JavaScript insertAdjacentHTML
- vxworks
- OD: Windows Kernel Debug
- CENTOS 挂载硬盘
- javascript 基本特性
- JavaScript进阶(九)JS实现本地文件上传至阿里云服务器
- View的相关原理(读书笔记)
- 详解Django中六个常用的自定义装饰器
- Chrome多线程下载
- 【硅谷问道】Chris Lattner 访谈录(下)
- eclipse缓慢了么?
- mysql中使用正则表达式查询
- 移动开发iOS&;Android对比学习--异步处理
- Installing python-ldap in Ubuntu
热门文章
- signal()函数
- 链表回文串判断&;&;链式A+B
- 【boost】使用lambda表达式和generate_n生成顺序序列
- 挖坟之Spring.NET IOC容器初始化
- openstack neutron
- LINQ标准查询操作符(一)——select、SelectMany、Where、OrderBy、OrderByDescending、ThenBy、ThenByDescending和Reverse
- ESB后台error日志
- 将服务器返回的URL或者网址截取出来特定的字符,然后将字符返回,一般根据返回的字符判断用户是否登录等即时状态
- poj 1273 Drainage Ditches(最大流)
- js 控制 table style css