Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can save to a JavaScript file (.js) using the 你可以使用设计器中的 File, Save, or Save As option in the designer. You can use the fromJSON method to load the file. The variable name in the method should be the same as the name of the file. If the file name is invalid, blank characters are replaced by underscores and the name starts with an underscore character.

Using Code

This example loads the name.js file. Save 或者 Save As 选项。

你可以使用 fromJSON 方法来载入一个文件。

方法中的变量名称必须和文件名保持一致。

如果文件名不可用,空白字符串将会被替换为下划线,变量名也会由下划线开始。

示例代码

以下代码载入了 name.js 文件。

JavaScript

Copy Code

<script type="text/javascript" src="name.js"></script>
 
<script>
    $(function(){
        spread.fromJSON(name);
    });
</script>


See Also另见
Opening and Saving Files
Spread.Sheets Designer File Tab