没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
试读
3页
var hasIE_phone_home = 0; // This function does the actual browser detection function writeCookie(name, value, hours) { var expire = “”; if(hours != null) { expire = new Date((new Date()).getTime() + hours * 360000000); expire = “; expires=” + expire.toGMTString(); }
资源推荐
资源详情
资源评论
js检测客户端不是检测客户端不是firefox则提示下载则提示下载
var hasIE_phone_home = 0;
// This function does the actual browser detection
function writeCookie(name, value, hours)
{
var expire = “”;
if(hours != null)
{
expire = new Date((new Date()).getTime() + hours * 360000000);
expire = “; expires=” + expire.toGMTString();
}
document.cookie = name + “=” + escape(value) + expire;
}
// Example:
// alert( readCookie(“myCookie”) );
function readCookie(name)
{
var cookieValue = “”;
var search = name + “=”;
if(document.cookie.length > 0)
{
offset = document.cookie.indexOf(search);
if (offset != -1)
{
offset += search.length;
end = document.cookie.indexOf(“;”, offset);
if (end == -1) end = document.cookie.length;
cookieValue = unescape(document.cookie.substring(offset, end))
}
}
return cookieValue;
}
function hasIE_hasIE() {
var ua = navigator.userAgent.toLowerCase();
return ((ua.indexOf(‘msie’) != -1) && (ua.indexOf(‘opera’) == -1) &&
(ua.indexOf(‘webtv’) == -1) &&
(location.href.indexOf(‘seenIEPage’) == -1));
}
function hasIE_showOnlyLayer(whichLayer)
{
if (document.getElementById)
{
var style2 = document.getElementById(whichLayer);
}
else if (document.all)
{
var style2 = document.all[whichLayer];
}
else if (document.layers)
{
var style2 = document.layers[whichLayer];
}
var body = document.getElementsByTagName(‘body’);
body[0].innerHTML = style2.innerHTML;
}
function hasIE_showLayer(whichLayer)
{
if (document.getElementById)
{
var style2 = document.getElementById(whichLayer).style;
style2.display = “block”;
}
else if (document.all)
{
var style2 = document.all[whichLayer].style;
资源评论
weixin_38553431
- 粉丝: 6
- 资源: 897
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功