0

In a question I've seen the line containing

onkeyup="JavaScript: TextChange()" onmouseup="JavaScript: TextChange(this)"`

What is it used for? I am seeing this for the first time in my life. I mean label JavaScript:.

k0pernikus
  • 60,309
  • 67
  • 216
  • 347
Red Crow
  • 11
  • 2
  • 1
    This is a thing of the (far) past. Now you may ignore the javascript prefix giving the type. Just as you should completely drop inline event handlers. – Denys Séguret Jun 07 '18 at 13:43
  • Old IEs were using the pseudo protocol to make a distinct between JScript and VBScript in inline event handlers. Nowadays it not used, VBScript support for web pages was dropped in IE11. – Teemu Jun 07 '18 at 13:48
  • TIL VBScript is still available in IE10 – Denys Séguret Jun 07 '18 at 13:49
  • @DenysSéguret Yup, and also in IE11, but only with file protocol. – Teemu Jun 07 '18 at 13:49

1 Answers1

0

Nothing. The label is entirely pointless as there is no loop to continue or break from.

It's cargo culting the javascript: URL scheme and has no place in an intrinsic event attribute.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
  • I think the first versions of IE having some kind of JS (instead of VBScript only) did ask for that language type specification. But... it's old... – Denys Séguret Jun 07 '18 at 13:46