以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  if语句问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=130763)

--  作者:cyrollin
--  发布时间:2019/1/31 12:59:00
--  if语句问题
dim dt as date
if e.form.controls("radiobutton1") .checked = true
   dt = date.today()
        else if e.form.controls("radiobutton2") .checked = true
   dt = date.today.adddays(1)
        else e.form.controls("radiobutton3") .checked = true
   dt = date.today.adddays(2)
end if

点击radiobutton3, 没有获取到dt的值,哪里不对呢?

--  作者:y2287958
--  发布时间:2019/1/31 14:14:00
--  
Dim dt As Date
If e.form.controls("radiobutton1") .checked = True
    dt = Date.today()
ElseIf e.form.controls("radiobutton2") .checked = True
    dt = Date.today.adddays(1)
ElseIf e.form.controlsradiobutton3") .checked = True
    dt = Date.today.adddays(2)
End If
Output.Show(dt)