Este sería un ejemplo sencillito:
Código HTML:
<html>
<head>
<script>
function mostrarTexto(texto){
document.getElementById("capaTexto").innerText=texto;
}
</script>
</head>
<body>
<input type="button" value="Mostrar Texto" onClick="mostrarTexto('Macromedia')">
<div id="capaTexto"></div>
</body>
</html>