內躲藏,我試圖找出一種方法來隱藏和我的網頁上重新出現的事情:的Javascript在線href屬性
<a href="javascript: document.getElementById('something').style.display = 'inline'">
prompt
</a>
<div id="something" style="display:none">
text
</div>
爲什麼不是這方面的工作?這是一種讓我在單擊提示時重新顯示文本的方法。
我特別感興趣的是爲什麼不是我的href = javascript部分工作,而不是使用onclick的解決方法。
將內聯JavaScript放在'a'標籤的'onclick'屬性中。 – mafafu
@mafafu謝謝,這個工作,但我仍然對原來的工作不感興趣,因爲我沒有看到故障代碼中的錯誤。 – Kravaros
可能重複[javascript hide/show element](http://stackoverflow.com/questions/6242976/javascript-hide-show-element) – Allende