跳至內容
主選單
主選單
移至側邊欄
隱藏
導覽
首頁
最近修改
新手使用指南
隨機頁面
貢獻分數
建立新頁面
工具
上傳檔案
特殊頁面
搜尋
搜尋
建立賬號
登入
個人工具
暗色模式
建立賬號
登入
用於已登出編輯者的頁面
了解更多
貢獻
討論
正在編輯
模組:Airport destination list
模組
討論
English
閱讀
編輯原始碼
檢視歷史
工具
工具
移至側邊欄
隱藏
操作
閱讀
編輯原始碼
檢視歷史
一般
連結至此的頁面
相關變更
特殊頁面
頁面資訊
取得短網址
警告:
您尚未登入。 若您進行任何的編輯您的 IP 位址將會被公開。 若您
登入
或
建立帳號
,您的編輯將會以您的使用者名稱標示,並能擁有另外的益處。
防垃圾訊息檢查用。
請勿
填寫此欄位!
local p = {} local function isnotempty(s) return s and s:match( '^%s*(.-)%s*$' ) ~= '' end function p.table(frame) local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args local cols if isnotempty(args['4thcoltitle']) and isnotempty(args['3rdcoltitle']) then cols = 4 elseif isnotempty(args['3rdcoltitle']) then cols = 3 else cols = 2 end -- compute the maximum cell index local cellcount = 0 for k, v in pairs( args ) do if type( k ) == 'number' and isnotempty(v) then cellcount = math.max(cellcount, k) end end -- compute the number of rows local rows = math.ceil(cellcount / cols) -- create the root table local root = mw.html.create('table') root :addClass('wikitable') :addClass('sortable') :css('font-size', '85%') -- add the header row local row = root:tag('tr') local cell= row:tag('th') cell:wikitext('航空公司') cell= row:tag('th') cell:addClass('unsortable') cell:wikitext('目的地') if (isnotempty(args['3rdcoltitle'])) then cell= row:tag('th') cell:css('width','10%') if (isnotempty(args['3rdcolunsortable'])) then cell:addClass('unsortable') end cell:wikitext(args['3rdcoltitle']) end if (isnotempty(args['4thcoltitle'])) then cell= row:tag('th') if (isnotempty(args['4thcolunsortable'])) then cell:addClass('unsortable') end cell:wikitext(args['4thcoltitle']) end -- loop over rows for j=1,rows do row = root:tag('tr') for i=1,cols do cell= row:tag('td') if (i > 2) then cell:css('text-align','center') end cell:wikitext(args[cols*(j - 1) + i] or '') end end -- return the root table return tostring(root) end return p
摘要:
請注意,所有於合眾百科 Unitedbook所做的貢獻會依據CC BY-NC-SA(創用CC 姓名標示─非商業性─相同方式分享)授權條款發佈(詳情請見
合眾百科:版權
)。若您不希望您的著作被任意修改與散佈,請勿在此發表文章。
您同時向我們保證在此的著作內容是您自行撰寫,或是取自不受版權保護的公開領域或自由資源。
請勿在未經授權的情況下發表文章!
取消
編輯說明
(在新視窗開啟)
此頁面使用了以下模板:
模組:Airport destination list/doc
(
編輯
)
切換限制內容寬度