日期:2014-05-17 浏览次数:20559 次
<script type="text/javascript">
var a = @ViewBag.User.Birthday.ToString();
//....
</script>
var a = "@ViewBag.User.Birthday.ToString();"
ViewBag.Message=null;
<input class="text" id="Tel" value="@(ViewBag.Message == null ? "为空时显示值" : ViewBag.Message)"/>
<input type="text" id="Tel" value="@(ViewBag.User.Tel??"为空时的值")"/>