-
-
Save dgbrahle/467039 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> | |
<html> | |
<head> | |
<script language="javascript" type="text/javascript"> | |
function showanswer() | |
{ | |
if (!document.html) | |
return | |
document.html.num_answers.src= | |
document.answerMC.num_ans.options[document.answerMC.num_ans.selectedIndex].value | |
} | |
function insertABunchOfElements(){ | |
var txt = "Dave"; | |
var newtext = document.createTextNode(txt); | |
document.body.appendChild(newtext); | |
} | |
function insertABunchOfFields(){ | |
var answerCount = //whatever the user has selected from the dropdown | |
for(i=0; i<=5; i++) | |
{ | |
var li = document.createElement("li"); | |
var input = document.createElement("input"); | |
input.id = i; | |
input.name = i; | |
input.type = "text"; | |
li.appendChild(input); | |
field_area.appendChild(li); | |
} | |
</script> | |
</head> | |
<body> | |
<select onchange="insertABunchOfElements();"> | |
<option selected value="Click">Click</option> | |
<option value="Test">Test</option> | |
<option value="13">13</option> | |
</select> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment