带循环的下拉菜单选择
我正在创建 2 个下拉菜单,其中第一个是开始时间,例如上午 8:00,它使用循环来生成时间,这工作正常,下拉菜单具有所需的时间范围,现在我需要创建一个脚本如果开始时间大于结束时间并且我有这个,则返回为 false:
var conting_timefrom=frm_conting.timefrom.value;
if(isNaN(conting_timefrom)){alert("You need to enter a starting time.");return false;};
if(conting_timefrom.value>conting_timeto.value){alert("The time you have entered is after the finish time.");return false;};
但是这不起作用,有任何线索吗?
I am creating 2 drop down menus where the first is a start time, e.g. 8:00 am which uses a loop to generate the times, this works fine and the drop down menu has the desired time frames, now i need to create a script which returns as false if the start time is greater than the finish time and i have this:
var conting_timefrom=frm_conting.timefrom.value;
if(isNaN(conting_timefrom)){alert("You need to enter a starting time.");return false;};
if(conting_timefrom.value>conting_timeto.value){alert("The time you have entered is after the finish time.");return false;};
however this doesn't work, any clues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)