What is the difference between onClick="javascript: function('value')'" and onClick="function('value');"?

Viewed 21352

What is the difference between the following?

  1. onClick="javascript: function('value');"
  2. onClick="function('value');"

When do I use the javascript: before the function call, and why?

Can I call the function without using javascript: prefix?

Please help me understand the difference.

2 Answers
Related