Не работают обработчики событий
<!DOCTYPE HTML>
<html>
<head>
<title>Game of Life</title>
<script type="text/javascript" src="javascripts/Game of Life.js"></script>
</head>
<body>
<div>
<div>
<button id="start">Start</button>
<button id="pause">Pause</button>
<button>Previous</button>
<button>Next</button>
<output id="output">null</output>
</div>
<div>
<script type="text/javascript">
new GameOfLife();
</script>
</div>
</div>
</body>
</html>
// Generated by CoffeeScript 1.7.1
(function() {
var GameOfLife;
GameOfLife = (function() {
GameOfLife.prototype.output = null;
GameOfLife.prototype.start = null;
GameOfLife.prototype.pause = null;
function GameOfLife() {
this.output = document.getElementById('output');
this.start = document.getElementById('start');
this.pause = document.getElementById('pause');
this.output.value = "FUCK";
document.getElementById('start').onclick = function() {
return this.output.value = "startF";
};
this.pause.onclick = function() {
return this.output.value = "pauseF";
};
}
return GameOfLife;
})();
window.GameOfLife = GameOfLife;
}).call(this);
|