js/jquery操作div显示或隐藏
2015-07-29 15:28
716 查看
js操作:
function tvTabListChange(el){
var tabOne = document.getElementById("tabOne");
var tabTwo = document.getElementById("tabTwo");
if(el==1){//节目表
tabOne.style.display="block";
tabTwo.style.display="none";
}else if(el==2){//换台
tabOne.style.display="none";
tabTwo.style.display="block";
}
}
jQuery操作:
function tvTabListChange(el){
if(el==1){//节目表
$("#tabOne").show();
$("#tabTwo").hide();
}else if(el==2){//换台
$("#tabOne").hide();
$("#tabTwo").show();
}
}
function tvTabListChange(el){
var tabOne = document.getElementById("tabOne");
var tabTwo = document.getElementById("tabTwo");
if(el==1){//节目表
tabOne.style.display="block";
tabTwo.style.display="none";
}else if(el==2){//换台
tabOne.style.display="none";
tabTwo.style.display="block";
}
}
jQuery操作:
function tvTabListChange(el){
if(el==1){//节目表
$("#tabOne").show();
$("#tabTwo").hide();
}else if(el==2){//换台
$("#tabOne").hide();
$("#tabTwo").show();
}
}
相关文章推荐
- ASP.NET MVC 4 (十一) Bundles和显示模式--asp.net mvc中 @Scripts.Render("~/bundles/jquery")是什么意思? 在布局文件中使用Scripts.Render()输出脚本包,Styles.Render()输出风格包:
- 基于jquery的静态页面翻页
- jQuery节点操作,jQuery插入节点,jQuery删除节点,jQuery Dom操作
- jquery的DOM元素操作
- Struct2前台后台数据交互jquery+ajax
- jquery学习教程视频 链接
- 使用 jQuery.i18n.properties 实现 Web 前端的国际化
- Jquery结合datagrid框架
- [JQuery] jquery.fn.extend 与 jquery.extend
- jquery-validation 使用
- jQuery----经典表单应用
- Jquery easyui 的datagrid 每行增加操作链接-修改
- jquery 隐藏/显示(改进版)
- jQuery链式语法演示
- jquery ui 的autocomplete 点击就加载指定数组
- PHP jQuery实现上传图片时预览图片的功能实例
- 如何设置jquery的ajax方法为同步
- JQuery 双击动态编辑
- jquery常用选择器
- 1、checkbox日常jquery操作。 现在我们以下面的html为例进行checkbox的操作。 <input id="checkAll" type="checkbox" />全选