Tryit Editor v1.8

Source Code:
<!DOCTYPE html> <html> <body> <p>Click one of the buttons to call a function with arguments</p> <button onclick="myFunction('Harry Potter','Wizard')">Click for Harry Potter</button> <button onclick="myFunction('Bob','Builder')">Click for Bob</button> <script> function myFunction(name,job) { alert("Welcome " + name + ", the " + job); } </script> </body> </html>
Result:
W3Schools.com - Try it yourself