Javascript-форум (https://javascript.ru/forum/)
-   Общие вопросы Javascript (https://javascript.ru/forum/misc/)
-   -   Показать процедуру ( по возмодности объяснить) (https://javascript.ru/forum/misc/69312-pokazat-proceduru-po-vozmodnosti-obyasnit.html)

Ghoster 13.06.2017 17:25

Показать процедуру ( по возмодности объяснить)
 
Вложений: 1
Подскажите как кнопки из gamemenu выполняют команды

document.getElementById("specific").onclick = function(event) {
        // Ensure we don't accidentally process these events when a
        // dialog is actually active, e.g. because the button still
        // has keyboard focus
        if (dlg_dimmer === null)
            command(0);
    };
    document.getElementById("random").onclick = function(event) {
        if (dlg_dimmer === null)
            command(1);
    };
    document.getElementById("new").onclick = function(event) {
        if (dlg_dimmer === null)
            command(5);
    };
    document.getElementById("restart").onclick = function(event) {
        if (dlg_dimmer === null)
            command(6);
    };
    undo_button = document.getElementById("undo");
    undo_button.onclick = function(event) {
        if (dlg_dimmer === null)
            command(7);
    };
    redo_button = document.getElementById("redo");
    redo_button.onclick = function(event) {
        if (dlg_dimmer === null)
            command(8);
    };
    document.getElementById("solve").onclick = function(event) {
        if (dlg_dimmer === null)
            command(9);
,
часть кода с генерацией и авторешением ( по возможности хоть чуть-чуть объяснить). Исходник в zip файле.


Часовой пояс GMT +3, время: 00:00.