Javascript 无法验证日期选择器的日期输出
我正在为我的日期选择器使用一个名为SCW的小js小部件,一切正常。现在我想验证事件onfocusout上日期选择器的日期。所有的工作都很好,除了我得到的是初始日期,而不是日期选择器刚刚选择的日期。我落后了一步:每次我选择一个新的日期 在SCW脚本的帮助文本中,它表示:Javascript 无法验证日期选择器的日期输出,javascript,textfield,Javascript,Textfield,我正在为我的日期选择器使用一个名为SCW的小js小部件,一切正常。现在我想验证事件onfocusout上日期选择器的日期。所有的工作都很好,除了我得到的是初始日期,而不是日期选择器刚刚选择的日期。我落后了一步:每次我选择一个新的日期 在SCW脚本的帮助文本中,它表示: // Finally you can use the following technique to run a function // when the calendar closes: // //
// Finally you can use the following technique to run a function
// when the calendar closes:
//
// scwNextAction=<<function>>.runsAfterSCW(this,<<arguments>>);
// scwShow(<<element>>,event <<,optional arguments above>>);
//
// Where <<function>> is a function defined on the calling page
// and <<arguments>> is the list of arguments being passed to that
// function.
我以为这能帮我,但我想不出来
我的代码是:
<input name="dato"type="text" class="ff" id="dato" tabindex="1"
onclick="scwShow(dato,event);" value="<%=dato%>" size="12" onfocusout="tjektimereg(this.value)"/>
使用输入的OnChange事件。这样,您将获得所选的最新值/日期。不幸的是,只有在您手动键入时才有效-从日期选择器SCW中拾取时,事件onchange不会触发…但感谢您的回复。