后台代码:

        // 进入仪器list界面之前查看 是否是科研处人员
        SessionContainer sc = (SessionContainer) session.getAttribute("SessionContainer");
        Boolean b = sc.hasRole("KJGLC_FY");
        model.addAttribute("b", b);

 

 

前台代码:

    var b = "${b}";
   var c = !!"${b}"
   alert("开始测试 ");
   if(c=="true"){
       alert("他是个字符串");
   }
   if(c=="false"){
       alert("他是个字符串");
   }
   if(c=true){
       alert("改为boolean了 ");
   }
   if(c==false){
       alert("改为boolean了 ");
   }

 

链接:实用js装逼指南

     http://www.iteye.com/news/31526

相关文章:

  • 2022-12-23
  • 2021-08-18
  • 2022-12-23
  • 2021-09-21
  • 2022-12-23
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2022-01-14
  • 2021-09-13
  • 2021-06-01
相关资源
相似解决方案