306781704 发表于 2013-2-7 17:01:06

显示隐藏的元素

<!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=utf-8" />
<title>无标题文档</title>
</head>
<script>
function p()
 {
  if(document.getElementById('fenlei').value==0)
   document.getElementById('other').style.display='';
  else
   document.getElementById('other').style.display='none'; 
 }
</script>
<body>
<select name="fenlei" onchange="p();" id="fenlei">
<option value="1">电脑</option>
<option value="0">其它</option>
</select><br />
<div id="other" style="display:none">
   <label>分类名称:<input type="text" name="other" id="other"/>*</label><br />
</div>
</body>
</html>
 
 
 
即时刷新验证码
<img border="0"  src="code.jsp" alt="看不清?点击更换一张图"/>
 
 
 
<a href="do/deletefriendlinks.jsp?id=<%=friendlist.get(i).getId() %>" >删除</a>   标签中执行删除操作弹出提示框
 
 
<li><a href="#" >加入收藏</a></li>
    <li><a href="#" >设为主页</a></li>
 
 
 
 
页: [1]
查看完整版本: 显示隐藏的元素