<html>
<head>
<title>JS</title>
<script type="text/javascript">
function erase() { document.getElementById("text").innerHTML=null; }
function add(value) {
document.getElementById("text").innerHTML=value;
setTimeout("erase()",3000) }</script></head>
<body>
<div id="text">...........</div><br />
<a href="#" onclick="add('ahahaha')">mda</a>
</form>
</body>
</html>