如何在 ASP.NET MVC 2 Web 应用程序中实现交通灯功能?
交通信号灯有红、黄、绿三种颜色,通常是暗的或禁用的。
有3种状态,Error,Warning,Normal,外面会收到。 如果状态错误,则红灯闪烁。 如果状态错误,则黄灯闪烁。 如果状态正常,则绿灯亮。
这是我在网络开发中遇到的第一个挑战。 如果有人能提供帮助,我将不胜感激。
The traffic light will have three light(red, yellow and green), normally they are dark or disabled.
there is 3 states, Error, Warning, Normal and it will be received outside.
if the state is error, then the red light will be blinking.
if the state is error, then the yellow light will be blinking.
if the state is normal, then the green light will be illuminated.
This is the first challenge for me in web developement.
I will be appreciated that someone could help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来你需要使用 javascript 来做到这一点。我会做一个开关来检查隐藏文本框的值。如果该值正常则执行某些操作,如果该值错误则执行某些操作。我现在正在编写代码..请给我几分钟。
It sounds like you need to use javascript to do this. I would make a switch that checks the value of lets say a hidden text box. If the value is normal then do something, if the value is error then do something. I'm writing the code right now.. give me a few minutes.