能不能定义一个数值对象,但暂时先不给它赋任何值?

超群 王 shared this question 2 months ago
Answered

能不能定义一个数值对象,但暂时先不给它赋任何值?因为我要给这个数值对象关联一个输入框,但在人为输入之前,我不想让框里显示任何数。

下面的ggb是我仿照唐大仕老师的视频教程做的,每次点击“重新出题”按钮后,“答案”框里总显示0,但在使用者输入自己的答案之前,我不想让框里显示包括0在内的任何数,能做到么?

Comments (2)

photo
1

you can create something lika a=undefined. If you make an inputbox for it it will show empty. When typing a number in it, the object a will get this value as a normal number.

chris

photo
1

Thank you for solving my problem.Your answer is very helpful

photo
© 2020 International GeoGebra Institute