Почему не работает этот код ??? смотрел в консоли ошибки но так и не понял почему не работает !?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<canvas id='myCanvas' height='500' width='700' style="border:1px solid black;"> </canvas>
<input type="text" id="user" placeholder="Никнейм" maxlength="14" autofocus />
<button type="button" id="play">Установить никнейм </button>
</body>
</html>
var nickname = this.document.getElementById("user").value;
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext('2d');
play.onclick = function(){
ctx.font = "20px Arial";
ctx.fillStyle = "black";
ctx.fillText("name:" + nickname,110,90);
};