How are you,
I need to write the follwoing code in JavaScript. I
Thank you in advance.
<script language = "VBScript">
Dim days(7)
days(0) = "Sunday"
days(1) = "Monday"
days(2) = "Tuesday"
days(3) = "Wednesday"
days(4) = "Thursday"
days(5) = "Friday"
days(6) = "Saturday"
Sub SetDay (day)
Daybox.value = "You Selected " & days(day) &" for your delivery"
End Sub
</script>
</head>
<body>
<h2>Please select the delivery day of the week</h2>
<br>
<form name = "DayForm">
<tr><td>
<input type = "radio" name = "RadioDays" onClick =
"SetDay(0)">Sunday
</td></tr>
<tr><td>
<input type = "radio" name = "RadioDays" onClick =
"SetDay(1)">Monday
</td></tr>
<tr><td>
<input type = "radio" name = "RadioDays" onClick =
"SetDay(2)">Tuesday
</td></tr>
<tr><td>
<input type = "radio" name = "RadioDays" onClick =
"SetDay(3)">Wednesday
</td></tr>
<tr><td>
<input type = "radio" name = "RadioDays" onClick =
"SetDay(4)">Thursday
</td></tr>
<tr><td>
<input type = "radio" name = "RadioDays" onClick =
"SetDay(5)">Friday
</td></tr>
<tr><td><input type = "radio" name = "RadioDays" onClick =
"SetDay(6)">Saturday
</td></tr> </td></tr>
</table>
</form>
<br>
<input type = "text" name = "Daybox" size = "50">
</center>
</body>