|
INTRODUCTION
本文包含有关如何在 Groove 表单工具在 Microsoft Office Groove 2007年或 Groove 的早期版本中执行简单的数学函数的示例。
更多信息
要编程, 窗体工具中执行数学函数可能必须通过使用 JavaScript 来表单工具脚本代码中创建事件驱动方法。 以下是 JavaScript 中快速代码示例。 本示例在两个表单字段, f 2 f 1 和值相乘。 此外, 本示例将该结果值赋给表单, 结果 上其他域: function multButton_onClick() //Function is called when the multiplication script button is clicked. { //First operand and second operand are unformatted number fields on a form. var f1=document.GrooveFormBase.FirstOperand.value; var f2=document.GrooveFormBase.SecondOperand.value; //Temporarily store result of multiplication. var f3 = f1* f2; //Assign the value in f3 to an unformatted number field "Result" which is on the form. document.GrooveFormBase.Result.value = f3; } |
|