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