main.lua

来自「嵌入式无线路由系统openwrt的web配置工具」· LUA 代码 · 共 22 行

LUA
22
字号
#!/usr/bin/lua-- Copyright (C) 2008 OpenRB.comrequire('fslib')cfgvars = {}cfg = uci.init('ntpclient')if (cfg ~= nil) then    for section, options in pairs(cfg) do        if (options['.type'] == 'ntpclient') then            cfgvars[section] = {                cells = {                    toString(options['hostname']),                    toString(options['port']),                    { cls = 'Icon Delete' }                }            }        end    endendio.write(json.encode(cfgvars))

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?