0

Possible Duplicate:
onclick=“javascript:func()” vs. onclick=“func()”

what is the deferent between following 2 lines

  1. onClick="javascript:test();"

  2. onClick="test();"

if any page has javascript and vb script, can we do this ?

  onClick="javascript:test1(); vbscript:test2();"
Community
  • 1
  • 1
Madura Harshana
  • 1,299
  • 8
  • 25
  • 40
  • Why would *any* sane person use vbscript on a website at all? It only works in IE... – ThiefMaster Dec 18 '12 at 06:19
  • yp, im working in a vbscript converting project. so I need to test some dependent functions one by one.I have to convert all vbscript functions to javascript. – Madura Harshana Dec 18 '12 at 06:22
  • @MaduraHarshana If there are VBScript and JavaScript on the same page, VBScript seems to be the first to capture events, so the pseudoprotocol is needed to invoke correct eventhandler function. Both pseudoprotocols can't be used in the same attribute. In JS a colon (`:`) marks a label, so the rest of the code would be treated like a labeled code in any code. – Teemu Dec 18 '12 at 07:12

0 Answers0