编写函数jsValue,功能:求Fibonacci数列中大于t的第一个数,结果由函数返回。

JavaScript012

编写函数jsValue,功能:求Fibonacci数列中大于t的第一个数,结果由函数返回。,第1张

c还是 。。。c++

#include<stdio.h>

int  jsValue(int n){

int a=1

int b=1

int s=1

while(1){

if(n<s)

return b

else

{

s=a+b

a=b

b=s

}

}

}

int main(){

int s

scanf("%d",&s)

printf("%d",jsValue(s))

return 0

}

JS里获取值的方式是getValue()或是getCellValue()  

在JS访问数据库,例:

var sql = "select * from table where a.userid = "+userid+" and b.menuid = "+menuid

var res = FR.remoteEvaluate('=SQL("数据库连接","'+sql+'",1,1)')

组件的属性value使用预定义函数 setValue()和getValue()。