Can you see anything wrong with this code?

In an online html checker, for the code below, I get the error message - Error: required attribute type not specified. Can anyone see anything wrong with it please?

<script>
 71   function capLock(e){
 72   kc = e.keyCode?e.keyCode:e.which;
 73   sk = e.shiftKey?e.shiftKey:((kc == 16)?true:false);
 74   if(((kc >= 65 && kc <= 90) && !sk)||((kc >= 97 && kc <= 122) && sk))
 75   document.getElementById('divMayus').style.visibility = 'visible';
 76   else
 77   document.getElementById('divMayus').style.visibility = 'hidden';
 78   }
 79   </script>

No problem. :slight_smile:

Many thanks Robert, that solved it. :slight_smile:

Yes, you need the type attribute for the start SCRIPT tag like it says for example: <script type=“text/javascript”> there might be other errors too but that is what if was asking for.