在controller中加入代码

ViewBag.js="<script>alert('弹出框');</script>";

在视图中加入代码

@Html.Raw(ViewBag.js)

相关文章:

  • 2021-11-19
  • 2021-08-06
  • 2022-12-23
  • 2021-07-25
  • 2022-01-01
  • 2022-01-01
  • 2022-03-08
猜你喜欢
  • 2021-10-15
  • 2021-09-01
  • 2022-12-23
  • 2022-01-01
  • 2022-01-01
  • 2022-12-23
相关资源
相似解决方案