| Revision 350,
769 bytes
checked in by jdalbey, 7 years ago
(diff) |
|
Add a branch EInotebook for Electronic Instructor Notebook prototype
|
| Line | |
|---|
| 1 | <!DOCTYPE html> |
|---|
| 2 | <html> |
|---|
| 3 | <head> |
|---|
| 4 | <script src="snoopy.txt"> |
|---|
| 5 | // contents of myname.txt is javascript that assigns data to a variable |
|---|
| 6 | </script> |
|---|
| 7 | <script> |
|---|
| 8 | function getIndex() { |
|---|
| 9 | document.getElementById("fruit").innerHTML = |
|---|
| 10 | document.getElementById("mySelect").selectedIndex; |
|---|
| 11 | } |
|---|
| 12 | </script> |
|---|
| 13 | </head> |
|---|
| 14 | <body> |
|---|
| 15 | <p id="demo">What time is it?</p> |
|---|
| 16 | <button type="button" onclick='document.getElementById("demo").innerHTML = snoopy'>Get The Time</button> |
|---|
| 17 | <hr> |
|---|
| 18 | <p id="fruit">Hello</p> |
|---|
| 19 | <form> |
|---|
| 20 | Select your favorite fruit: |
|---|
| 21 | <select id="mySelect"> |
|---|
| 22 | <option>Apple</option> |
|---|
| 23 | <option>Orange</option> |
|---|
| 24 | <option>Pineapple</option> |
|---|
| 25 | <option>Banana</option> |
|---|
| 26 | </select> |
|---|
| 27 | <br><br> |
|---|
| 28 | <input type="button" onclick="getIndex()" |
|---|
| 29 | value="Display the index of the selected option"> |
|---|
| 30 | </form> |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | </body> |
|---|
| 35 | </html> |
|---|
| 36 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.