[問題] 自動打開連結到的block?
Hi 大家好:
現在有弄了一個按下去隱藏文字就會出現的 script,可以動…
不過現在想改成如果使用者要直接跳到某個 block,say a.html#blockD3
那就順便啟動的時候就解除隱藏
可是不知道為什麼不能動 @_@
同一個function的 "@@" 有跳出來
但是文字不會自動展開 > <
請問大家,應該要怎麼修改比較好呢?
謝謝~
===測試用的簡化程式碼如下===
<html>
<head>
<script language=javascript>
function ShowElement(id_attribute_value)
{
window.alert("@@")
document.getElementById(id_attribute_value).style.visibility="inherit";
}
ShowElement('blockD3');
</script>
</head>
<body>
<a style="text-decoration: none"
href="javascript:ShowElement('blockD3')">D3</a><a name=D3> </a>
<div id=blockD3 style="visibility: hidden">
test
</div></body></html>
--
生即是死,死即是生,故實無生死也。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.168.157.57
※ 編輯: sonyu 來自: 218.168.157.57 (07/21 09:48)
※ 編輯: sonyu 來自: 218.168.157.57 (07/21 09:48)
推
07/21 10:13, , 1F
07/21 10:13, 1F
討論串 (同標題文章)
完整討論串 (本文為第 1 之 2 篇):