用VF怎么做简易计算器啊
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/11 06:46:59
用VF怎么做简易计算器啊
你在计算按钮上双击,在其click事件中输入代码
a=thisform.text1.value
b=thisform.text2.value
n=thisform.optiongroup1.value
do case
case n=1
thisform.text3.value=a+b
case n=2
thisform.text3.value=a-b
case n=3
thisform.text3.value=a*b
case n=4
thisform.text3.value=a/b
endcase
thisform.refresh
a=thisform.text1.value
b=thisform.text2.value
n=thisform.optiongroup1.value
do case
case n=1
thisform.text3.value=a+b
case n=2
thisform.text3.value=a-b
case n=3
thisform.text3.value=a*b
case n=4
thisform.text3.value=a/b
endcase
thisform.refresh