顯示隱藏的元素

<!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="看不清?點擊更換一張圖" onclick="this.src='code.jsp?'+Math.random()" />

 

 

 

<a href="do/deletefriendlinks.jsp?id=<%=friendlist.get(i).getId() %>" onclick="return confirm('確定刪除這個友情鏈接嗎??')">刪除</a>   標籤中執行刪除操作彈出提示框

 

 

<li><a href="#" onClick="window.external.AddFavorite(location.href,document.title)">加入收藏</a></li>
    <li><a href="#" onclick="var strHref=window.location.href;this.style.behavior='url(#default#homepage)';this.setHomePage(location.href);">設爲主頁</a></li>

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章