HTML 中定义全局变量
@{ int CurrentUserId =ViewBag.CurrentUserId; }
JS中取值方式var CurrentUserId = parseInt(@Html.Raw(CurrentUserId));