简单教程
提交运行
代码编辑器:
<!DOCTYPE html> <meta charset="utf-8" /> @{ var txt = ""; if ( DateTime.Now.Hour > 12 ) { txt = "Good Evening"; }else { txt = "Good Morning"; } } <p>The message is @txt</p>
运行结果: