如何使用Javascript构建公式? [英] How To Build A Formula Using Javascript?

查看:99
本文介绍了如何使用Javascript构建公式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经构建了2个javacript文件factor.js和parm.js. factor.js是一个数组,有几个因子作为元素。例如,factor.js看起来像:

I already built 2 javacript files factor.js and parm.js. factor.js is an array, having several factor as elements. for example, factor.js looks like:

展开 | 选择 | Wrap | 行号

推荐答案

嗨...


欢迎来到TSDN ...


听起来像家庭或课程作品?请显示到目前为止您的完整代码(html和javascript)...并告诉我们您遇到的具体问题。从文本框中获取值?如何通过脚本更新值? ...请展示你已经做出的努力...


亲切的问候
hi ...

welcome to TSDN ...

it sounds like home- or coursework? please show the entire code you have so far (html and javascript) ... and tell us what the particular problem is that you have. to get the values out of the textboxes? how to update a value through the script? ... please show the efforts you already made ...

kind regards


Heya,fanchun。欢迎来到TSDN!


发布源代码时请使用CODE标签。请在下次发布时查看页面右侧的REPLY GUIDELINES。
Heya, fanchun. Welcome to TSDN!

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.


我想构建一个公式。我需要使用文本框中输入的值构建一个数组。我已经在parmest.js中保存了一个数组。


i想建立一个像

y b0 + b1 * x1 + b1 * x2 +这样的公式...... 。

[b0,b1,b2,...]数组在parmest.js中;

i需要构建一个[x1,x2,...的数组。]。

和x1,x2,....的值在文本框中输入,并且可以变换,例如

x1:

x2:

...

i不知道如何创建这样的数组来保存值输入?以下代码中的函数存在一些问题:
i want to build a formula. and i need to build an array using values input in text boxes. i already have an array save in parmest.js.

i want to build an formula like
y= b0+b1*x1+b1*x2+....
array of [b0,b1, b2,...] is in parmest.js;
i need to build an array of [x1, x2,....].
and values of x1, x2 ,.... are input in text boxes, and are changable, like
x1:
x2:
...
i don''t know how to create such array to save values input? there is some problem with tthe function in the following code:
展开 | 选择 | Wrap | 行号


这篇关于如何使用Javascript构建公式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆