运行代码 缩小
汉王
HTML代码
复制 格式化 注释 注释 清空
放大
AخA
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<head>
4
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
5
<title>检测浏览器是否支持JavaScript功能</title>
6
</head>
7
<body>
8
如果您的浏览器支持的话,本页面什么也不会显示,如果不支持,则会出现提示!
9
<noscript>  
10
<body scroll=no style="text-align: center"><center><table border="0" style="height: 100%; width: 100%; right: 1%; left: 1%; background: black; position: fixed">
11
<tr><td align="center">
12
<div style="position: fixed; font-size: 18px; z-index: 2; cursor: help; background: #F8F8FF; width: 480px; color: black; padding: 5px 5px 5px 5px; border: 1px solid; border-color: maroon; height: auto; text-align: left; left: 20%">
13
<span style="font: bold 20px Arial; color:#F8F8FF; background: maroon; vertical-align: middle">对不起,你的浏览器没有打开JavaScript脚本支持!</span></div> 
14
</td></tr></table></center> 
15
</noscript>
16
</body>
17
</html>
CSS代码
复制 格式化 注释 注释 颜色 清空
放大
CSS代码...
x
 
1
JS代码
复制 格式化 注释 注释 清空
放大
JS代码...
xxxxxxxxxx
1
 
1
名称
检测浏览器是否支持JavaScript功能
分类
网站常用
描述
虽说一般情况下,用户不会禁用浏览器的JavaScript支持功能,但有时候无意或由其它程序会改变这些设置,本款代码可以帮助您检测用户浏览器是否打开了JavaScript俄方三个支持功能。注意,如果支持的话,本页面什么也不会显示,如果不支持,...
收藏