<script type="text/javascript">
window.onload = function(){
document.getElementsByTagName('a')[0].onclick = function(){
var div = document.getElementsByTagName('div')[0];
div.style.display = div.style.display == 'block' ? '' : 'block';
};
};
</script>
<style type="text/css">
div {display: none;}
</style>
<a href="#">click</a>
<div>text</div>