我正在尝试使用:http://terminal.jcubic.pl/
我希望能够从另一个函数调用 term.echo 以便能够在终端内放置数据,但我无法引用它。
下面是代码:
jQuery(document).ready(function($) {
    var id = 1;
    $('body').terminal(function(command, term) {
        if (command == 'help') {
            term.echo("available commands are mysql, js, test");
        } else{
          term.echo("entered: " + command);
        }
    }, {
        greetings: "Shell",
        onBlur: function() {
            return false;
        }
    });
});
如何从外部访问 term.echo,以便像单击按钮一样单击调用 term.echo 以添加数据?