找回密码
 立即注册

QQ登录

只需一步,快速开始

1594202459

注册会员

31

主题

48

帖子

163

积分

注册会员

积分
163

活字格认证

1594202459
注册会员   /  发表于:2014-12-26 15:49  /   查看:4792  /  回复:3
麻烦帮我看一下针对我下面的js代码,我还缺少什么js引用呢,为什么老报错
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <link href="css/jquery.wijmo.wijspread.3.20143.14.css" rel="stylesheet" />
    <script src="external/jquery-1.8.2.min.js"></script>
    <script src="interop/wijmo.data.ajax.3.20143.59.js" type="text/javascript"></script>
    <script src="interop/knockout.wijmo.3.20143.59.js" type="text/javascript"></script>
    <script src="external/globalize.min.js"></script>
    <script src="external/knockout-2.1.0.js"></script>
    <script src="external/jquery-ui-1.9.1.custom.min.js"></script>
      <script src="scripts/pluggable/jquery.wijmo.wijspread.binding.3.20143.14.js" type="text/javascript"></script>
    <script src="scripts/pluggable/jquery.wijmo.wijspread.formatter.3.20143.14.js" type="text/javascript"></script>
    <script src="scripts/pluggable/jquery.wijmo.wijspread.formulatextbox.3.20143.14.js"
        type="text/javascript"></script>
    <script src="scripts/jquery.wijmo.wijspread.all.3.20143.14.js"></script>
    <script src="scripts/interop/angular.wijmo.wijspread.3.20143.14.js" type="text/javascript"></script>
    <script src="interop/wijmo.data.breeze.3.20143.59.js" type="text/javascript"></script>
<head>
    <title></title>
<script id="scriptInit" type="text/javascript">
    $(document).ready(function () {
        $("#ss").wijspread();
        var sheet = $("#ss").wijspread("spread").getActiveSheet();
        sheet.getCell(0, 0).formatter("0.00_);(0.00)");
        sheet.getCell(1, 0).formatter("0.00_);(0.00)");
        sheet.getCell(0, 1).formatter("0.00_);(0.00)");
        sheet.getCell(1, 1).formatter("0.00_);(0.00)");
       // Set values to Text property
        sheet.getCell(0, 0).text(10);
        //Set values by calling SetText method
        sheet.setText(1, 0, 10);
        //Set values to Value property.
        sheet.getCell(0, 1).value(10);
        //Set values by calling SetValue method.
        sheet.setValue(1, 1, 10);
    });

3 个回复

倒序浏览
Alice
社区贡献组   /  发表于:2014-12-26 17:58:00
沙发
回复 1楼1594202459的帖子

具体报什么样的错误?请将错误提示发出来,根据提示找找错误所在。
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
1594202459
注册会员   /  发表于:2014-12-26 18:02:00
板凳
回复 1楼1594202459的帖子





这个是报错截图,麻烦您帮我分析下,我的js里面的代码具体该引用什么js

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
Alice
社区贡献组   /  发表于:2014-12-29 12:10:00
地板
回复 3楼1594202459的帖子

这里面有2个问题。
1.你的.js添加不正确。
2.getCell(0,0).text(10); sheet.setText(1,0,10).
text是string类型的值,必须传string进去。

根据你最近提问的问题,看的出你对学习该产品很有热情。
我们对你学习SpreadJs产品有几点建议:
1.学习基础知识:比如HTML,JQuery的相关知识。W3school网站上有免费的学习资源。地址:http://www.w3school.com.cn/
2.学习产品:主要通过产品文档和Sample。我们的产品文档写的还是很详细的,文档从基础知识讲起,GettingStarted章节就是最基础的知识。对于不清楚的还可以通过文档里的Search搜索关键字进行查询相关资料。

你的代码重写了,请参考:
  1. <!DOCTYPE html>

  2. <html xmlns="http://www.w3.org/1999/xhtml">

  3. <head>

  4.     <title></title>

  5.     <!--jQuery References-->

  6.     <script src="http://code.jquery.com/jquery-1.9.1.min.js" type="text/javascript"></script>

  7.     <!--SpreadJS Widgets JavaScript-->

  8.     <script src="http://cdn.wijmo.com/spreadjs/jquery.wijmo.wijspread.all.3.20143.14.min.js" type="text/javascript"></script>

  9.     <!--SpreadJS Widgets CSS-->

  10.     <link href="http://cdn.wijmo.com/spreadjs/jquery.wijmo.wijspread.3.20143.14.css" rel="stylesheet" type="text/css" />

  11.     <script>

  12.         $(document).ready(function () {

  13.             $("#ss").wijspread();

  14.             var sheet = $("#ss").wijspread("spread").getActiveSheet();

  15.             sheet.getCell(0, 0).formatter("0.00_);(0.00)");

  16.             sheet.getCell(1, 0).formatter("0.00_);(0.00)");

  17.             sheet.getCell(0, 1).formatter("0.00_);(0.00)");

  18.             sheet.getCell(1, 1).formatter("0.00_);(0.00)");

  19.             // Set values to Text property

  20.             sheet.getCell(0, 0).text("10");

  21.             //Set values by calling SetText method

  22.             sheet.setText(1, 0, "10");

  23.             //Set values to Value property.

  24.             sheet.getCell(0, 1).value(10);

  25.             //Set values by calling SetValue method.

  26.             sheet.setValue(1, 1, 10);

  27.         });

  28.     </script>

  29. </head>

  30. <body>

  31.     <div id="ss"></div>

  32. </body>

  33. </html>
复制代码
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部