用js解决jquery在360兼容模式下不起作用的事例
2015-12-13 00:15
639 查看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<script type="text/javascript">
function showdiv(thisdiv){
var varvalues="banner_son";
for(var i=1;i <=2;i++){
document.getElementById(varvalues+i).style.display='none'
}
document.getElementById(varvalues+thisdiv).style.display='block';
}
</script>
<body>
<div id="banner"><a href="#" id="menu1" onmouseover="showdiv('1');">所有商品</a>
<a href="#" id="menu2" onmouseover="showdiv('2');">新鲜水果</a>
</div>
<div id="banner_son1" style="display:none">1</div>
<div id="banner_son2" style="display:none">2</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<script type="text/javascript">
function showdiv(thisdiv){
var varvalues="banner_son";
for(var i=1;i <=2;i++){
document.getElementById(varvalues+i).style.display='none'
}
document.getElementById(varvalues+thisdiv).style.display='block';
}
</script>
<body>
<div id="banner"><a href="#" id="menu1" onmouseover="showdiv('1');">所有商品</a>
<a href="#" id="menu2" onmouseover="showdiv('2');">新鲜水果</a>
</div>
<div id="banner_son1" style="display:none">1</div>
<div id="banner_son2" style="display:none">2</div>
</body>
</html>
相关文章推荐
- 基于jQuery通过jQuery.form.js插件实现异步上传
- jquery插件uploadify实现带进度条的文件批量上传
- jQuery post 中文乱码
- JqueryUI draggable用法
- jQuery工作原理解析以及源代码示例
- jQuery常用标签
- jQuery常用语法
- jQuery方式事件冒泡的2个方法
- jQuery之家的资源
- 20151212Jquery 工具函数代码备份
- 20151212jquery学习笔记--工具函数
- jQuery插件编写
- 解密jQuery事件核心 - 绑定设计(一)
- DateTimePicker:jQuery日期和时间插件
- jquery.form.js实现异步上传
- 【积淀】jQuery写个简单的模态窗口组件
- jquery缓存使用jquery.cookies.2.2.0.min.js
- jquery mobile 移动web
- jQuery选择器总结
- jQuery的deferred对象详解--转自阮一峰