js显示隐藏代码

js显示隐藏代码

<!--
function onshow(values){
 var edit=document.getElementById("shows");
 var urlshow=document.getElementById("urls");
 if(values==1){
  edit.style.display="none";
  urlshow.style.display="block";
  
 }else{
  edit.style.display="block";
  urlshow.style.display="none";
 }
 
}
function onshowpic(values){
 var text=document.getElementById("rightbodycontent");
 var pic=document.getElementById("uploadpic");
 if(values==1){
  text.style.display="none";
  pic.style.display="block";
  
 }else{
  text.style.display="block";
  pic.style.display="none";
 }
 
}

-->
</script>

 调用方法,只要在要显示或隐藏的按钮加上onclick=onshowpic();

时间: 2024-08-01 05:11:28

js显示隐藏代码的相关文章

js显示隐藏层实例代码

<!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-

js显示/隐藏div代码收藏

 代码如下 复制代码 <script type="text/javascript"> function divcontrol(divid){   if(document.getElementById(divid).style.display=="none"){     document.getElementById(divid).style.display="";   }   else{     document.getElement

二款jquery div显示隐藏代码

<!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-

js 显示隐藏图片

显示 隐藏

js显示隐藏效果

提示:您可以先修改部分代码再运行 链接 dsfsdfdf 提示:您可以先修改部分代码再运行

js 显示隐藏左侧QQ客服效果

总服 车险 合作 在线留言

js+div 隐藏显示层代码

js+div 隐藏显示层代码 <script language=javascript> function toExit(){<!--对隐藏层的操作--> var args=toExit.arguments;<!--获取函数的输入值--> var visible=args[0];<!--函数的第一个输入值--> if(document.all){<!--对于ie浏览器-->   if(visible=='show')visible='visible

js控制li的隐藏和显示实例代码_javascript技巧

html页面 <div class="favorite_list"> <div class="list_type" id="list_type"> <ul class="all"> <li> <a href="javascript:void(0);" onclick="showli(1);">全部(<span class=

js控制显示与隐藏代码

js控制显示与隐藏代码,很简单我们就用到style.display 的显示与隐藏 block,none下面我们来看个实例. <script> function show(obj) {  document.getElementById(obj).style.display = "block" } function hide(obj) {  document.getElementById(obj).style.display = "none" } </