out

<c:out value="${ requestScope.cutoverStatus}"
 function disableKeys(eve)
{
   
   var ev = (document.all) ? window.event : eve;
   var evCode = (document.all) ? ev.keyCode : ev.which;
   var srcElement = (document.all) ? ev.srcElement : ev.target;
   if(srcElement.type != "textarea" )
   {
      if (evCode == 13)//退格键
      {
         return false;
      }
   }
   if(srcElement.type != "textarea" && srcElement.type != "text")
   {
      if (evCode == 8)//回车键
      {
         return false;
      }
   }
}
(document.all) ? (document.onkeydown = disableKeys) : (document.onkeypress = disableKeys);

你可能感兴趣的:(out)