Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script type="text/javascript">
- function changeText()
- {
- var selected = document.form1.sel.value;
- document.form1.txtInput.value = "You have selected "+;
- }
- </script>
- </head>
- <body>
- <form name="form1">
- <select name="sel" onChange=changeText()>
- <option value="A">A</option>
- <option value="B">B</option>
- <option value="C">C</option>
- <option value="D">D</option>
- </select>
- <input type="text" name="txtInput" />
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement