Ptty
1.0.0
PTTY是一个jQuery插件,可创建可扩展的终端模拟器。它很小,很快,可以通过添加命令和回调来完全自定义。
PTTY带有一组小助手,以便尽可能轻巧和可扩展,它可以:
$.register_command()
方法扩展Demmand。$.register_callback()
命令添加回调(包括其他jQuery插件)。$.flush_commands()
方法命令刷新。要启动PTTY,请只做以下操作:
$(document).ready(function(){
$('#terminal').Ptty();
});
或者您可以使用选项:
$(document).ready(function(){
$('#terminal').Ptty({
// Default ajax URL (can be relative or absolute).
url : 'ajax/',
// Set the PS to an empty string and change the defaults to use a custom css theme.
ps : '',
theme : 'boring',
welcome: 'Welcome to the matrix.'
});
});
请参阅在线文档,以了解插件选项和响应结构或查看演示,目前仅处理离线命令,但可以演示基础知识。
版本0.1.0: