感谢版主的回复。
关于cell的格式问题,我试了很多次,发现有规律。项目启动后第一次进入表格页面时,输入2.000总会变成2,再次进入的时候就不会了;
想请版主帮忙看看是什么导致的?
- <!-- SpreadJS语言设置(1)-->
- <meta name="spreadjs culture" content="zh-cn" />
- <!-- jQuery(2)
- <script src="<%=basePath%>js/other/assets/jquery-2.1.1.min.js"
- type="text/javascript"></script>
- -->
- <!-- Wijmo CSS(3)-->
- <link href="css/other/wijmo/jquery.wijmo.wijspread.3.20143.15.css"
- rel="stylesheet" type="text/css" />
- <!-- SpreadJS(4) -->
- <script
- src="js/other/wijmo/jquery.wijmo.wijspread.all.3.20143.15.min.js"
- type="text/javascript"></script>
- <!-- SpreadJS CSS(5)-->
- <link href="css/other/wijmo/jquery-wijmo.css" rel="stylesheet"
- type="text/css" />
- <!--
- <link rel="stylesheet" type="text/css" href="styles.css">
- -->
- <script>
- // SpreadJS 初始化
- $("#wijspread1").wijspread({
- sheetCount : 1, //初始化为2个标签页
- activeSheetIndex : 0, //活动页设置为第一个标签页
- allowUserZoom : true, //缩放功能是否启用
- newTabVisible : false //隐藏新建标签页按钮
- });
- //全局变量
- // 获得Spread 对象
- var spread = $('#wijspread1').wijspread('spread');
- // 获得当前激活的标签页
- var activeSheet = spread.getActiveSheet();
- function myReady() {
- //设置行列
- activeSheet.setRowCount(200);
- activeSheet.setColumnCount(200);
- // 获得第2行2列单元格
- var cell = activeSheet.getCell(2, 1);
- activeSheet.getCell(1, 1).value(2);
- };
- </script>
- </head>
- <body>
- <script type="text/javascript">
- $(document).ready(myReady);
- </script>
- <div id="wijspread1"
- style="width: 100%; height: 340px; border: 1px solid gray"></div>
- <br>
- </body>
复制代码 |