TextBox中的Time AscendingOrder [英] Time AscendingOrder in TextBox

查看:65
本文介绍了TextBox中的Time AscendingOrder的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai



实际上我有一个带有一些文本框的网格视图,如果我在文本框中给出时间,我必须在一个文本框中输入时间它需要时间仅按升序排列。例如:第一次如果我给8:30,下次如果我给8:20它不应该接受它,它应该花费时间超过8:30和08:30之后的值。

it不应该接受08:30以下的时间。



提前致谢

Hai

Actually i have a grid view with some textboxes, there i have to enter time in one textbox if i give time in text box it should take time in ascending order only. for eg: 1st time if i give 8:30 and next time if i give 8:20 it should not accept it, it should take time above 8:30 and after 08:30 values.
it should not accept time below 08:30.

Thanks in advance

推荐答案




请检查此代码: -



Hi,

Please check this code:-

<pre><script type="text/javascript">
    function checkTime(id) {
        
        var val =


' #' + id).val();
var t =
('#'+id).val(); var t =


' #txtTime1' )VAL();
if (val!= ){
if (val> t){

}
else {
alert(' 请检查你的价值' );
}
}
}


< / script>

< input type = text id = txtTime1 />
< input type = text id = txtTime2 onblur = checkTime(this.id) />
< input type = text id = txtTime3 onblur = checkTime(this.id) />
('#txtTime1').val(); if (val != "") { if (val > t) { } else { alert('Please check your value'); } } } </script> <input type="text" id="txtTime1" /> <input type="text" id="txtTime2" onblur="checkTime(this.id)" /> <input type="text" id="txtTime3" onblur="checkTime(this.id)" />


这篇关于TextBox中的Time AscendingOrder的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆