dojo TimeTextBox don';在模糊事件中听不到

dojo TimeTextBox don';在模糊事件中听不到,dojo,Dojo,我想在dojo timetextbox中添加一个on blur事件,但该事件从未运行过 因此,timetextbox的声明如下所示: <label>End</label><input id="endp" name="endp" onBlur="calculateTimeSpent2(startp,endp,output);" /> function calculateTimeSpent2(startp,endp,outputp) { var tmp0=

我想在dojo timetextbox中添加一个on blur事件,但该事件从未运行过 因此,timetextbox的声明如下所示:

<label>End</label><input id="endp" name="endp"  onBlur="calculateTimeSpent2(startp,endp,output);"  />
function calculateTimeSpent2(startp,endp,outputp)
{

var tmp0=document.getElementById('startp').value.split(':')

var tmp1=document.getElementById('endp').value.split(':')

如果(tmp0[0]!=''&&tmp1[0]!='') { var val1=findtime(tmp0[0],tmp0[1],tmp1[0],tmp1[1])

} }

我不明白为什么dojo在失去焦点时没有正确执行事件。 我试着把type=text放进去,但没用。
谢谢您的帮助。

startp、endp和output在调用方法处理程序时可能尚未定义。看起来您的函数实际上并没有使用它所命名的参数。也许您根本不需要传入任何值

var tmp=val1.split(':');
if (tmp[0].indexOf('-')==-1)
    document.getElementById('outputp').value=val1;
else 
{
    alert ("Start Time must be lower than End Time ");
    document.getElementById('endp').focus();
}