/JS
Created
July 7, 2010 18:16
Revisions
-
There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,57 @@ <!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>