What is the difference between onClick=”javascript: function(‘value’)'” and onClick=”function(‘value’);”? [duplicate]
In an element’s inline event handler, like onclick, onchange, onsubmit, etc., you do not need the javascript: prefix – the reason you often see it is because people confuse it with the href syntax that I explain below. It doesn’t cause an error – I believe it is interpreted as a label – but it … Read more