轉帖|使用教程|編輯:鮑佳佳|2020-09-23 15:32:53.590|閱讀 406 次
概述:SpreadJS 是一款基于 HTML5 的純前端電子表格控件,兼容 450 種以上的 Excel 公式,備受蘇寧易購、華為等五百強企業的青睞,本文主要講述如何為控件自定義外觀。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
您可以更改整個控件的外觀。
示例代碼
本示例為控件設置主題或視覺樣式。
<!DOCTYPE html> <html> <head> <title>SpreadJS Use Theme</title> <script src="http://code.jquery.com/jquery-2.0.2.js" type="text/javascript"></script> <link href="./css/gc.spread.sheets.13.0.0.css" rel="stylesheet" type="text/css" /> <script src="./scripts/gc.spread.sheets.all.13.0.0.js"></script> <script type="text/javascript"> $(function () { var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3}); var sheet = spread.getActiveSheet(); $("#btn1").click(function () { $("head").append($('<link href= "http://code.jquery.com/ui/1.8.12/themes/hot-sneaks/jquery-ui.css" rel="stylesheet" type="text/css" />')); setTimeout(function () { spread.repaint(); }, 500); }); }); </script> </head> <body> <div> <div id="ss" style="height: 300px; width: 50%"></div> </div> <input type="button" id="btn1" value="Change Theme" /> </body> </html>
設置控件邊框
本示例使用CSS設置邊框。
// 使用CSS更改邊框。 .spread { border-style: solid; border-width: 1px; border-color: red; }
今天的內容就到這了,不要忘了在評論區留下的意見和建議!現在電子表格控件SpreadJS限時優惠!低至3490;企業版最高立減6000元。點擊了解更多優惠!
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自: