求助!!VF高手来帮帮忙吧!!

来源:百度知道 编辑:UC知道 时间:2024/05/14 11:27:50
第一题:在表单上建一个“命令”和“文本框”
“命令”的名字是“查看日期”
按下“命令”,“文本框”中显示当前日期
松开“命令”,“文本框”中显示当前时间
第二题:在表单中建立三个“标签”,当单击任意一“标签”,
另两个标签的标题文本互换

希望VF高手能给出这两个题的程序 !!!谢啦!

第一

命令按钮mouseup事件下代码
thisform.text1.value=time()

thisform.refresh

命令按钮mousedown事件下代码
thisform.text1.value=date()

thisform.refresh

第二

表单初始话init事件中添加代码
thisform.text1.value=time()

打开表单就显示时间

表单init事件
thisform.label1.caption="A"
thisform.label2.caption="B"
thisform.label3.caption="C"

label1 的click事件下代码
a=thisform.label2.CAPTION
b=thisform.label3.caption
thisform.label2.caption=b
thisform.label3.caption=a

LABEL2的click事件下代码
a=thisform.label1.caption
b=thisform.label3.caption

thisform.label1.caption=b
thisform.label3.caption=a

label3的click事件代码
a=thisform.label1.caption
b=thisform.label2.caption

thisform.label1.caption=b
thisform.label2.caption=a

有什么不明白
QQ44571841