window.open()跳转页面时需要传值情况(mvc例)
html代码
1 <script> 2 function open_win() { 3 window.open("@Url.Content("~/GoodsKind/CreateKinds")?oneKind=@ViewBag.OneKind", '', "height = 300, width = 400,resizable=0,top=350,left=600,location=no"); 4 } 5 </script> 6 7 <div> 8 <button type="button" class="layui-btn" onclick="open_win()"> 9 <i class="layui-icon"></i> 添加 10 </button> 11 </div>
控制器代码
1 [HttpGet] 2 public ActionResult CreateKinds(int oneKind) 3 { 4 //实现代码 5 //.... 6 //.... 7 }

浙公网安备 33010602011771号