JavaScript Program to Create Pulldown Menu and After Clicking Open Selected Website

Write a JavaScript program to create pulldown menu and after clicking open selected website.

Write a JavaScript to create a pull – down menu with three options [google, msbte, yahoo] once the user will select one of the options then user will be redirected to that site.

Source Code
    <title>Creating Pull-down menu</title>
        function gotoWebsite(choice)
            url = choice.options[choice.selectedIndex].value
            if(url != "")
                window.location = url
<form action="" name="form1">
    Select your favourite website: 
    <select name="website" onchange="gotoWebsite(this)">
        <option value="">Google</option>
        <option value="">Yahoo</option>
    <option value="">MSBTE</option>