I bet if you used the debugger tools included in the browser you would see some exception along the lines of
Undefined variable [andr]
Basically your function is calling for it (andr) as a variable; instead of a string
<script type="text/javascript">
function stringWord() {
document.getElementById("andr").innerHTML="os";
}</script>