Team:Amsterdam/Sandbox
From 2011.igem.org
(Difference between revisions)
Pvandieken (Talk | contribs) |
Pvandieken (Talk | contribs) |
||
Line 1: | Line 1: | ||
{{:Team:Amsterdam/Header}} | {{:Team:Amsterdam/Header}} | ||
<html> | <html> | ||
- | |||
- | |||
- | |||
- | // | + | <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script> |
- | + | <script type="text/javascript"> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | var error=new Array("Saab","Volvo","BMW"); | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
+ | for(var i=0; i<=(error.length - 1); i++) { | ||
- | + | if (i==0){ | |
- | + | ||
- | + | var result = error[i]+ "<br />"; | |
- | + | } else { | |
- | + | var result = error[i]+ "<br />" + result; | |
- | + | } | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
} | } | ||
- | + | function fillIt() { | |
- | function | + | |
- | + | $("#array").html(result); | |
} | } | ||
- | |||
- | |||
- | |||
- | |||
</script> | </script> | ||
- | <div id=" | + | |
+ | </head> | ||
+ | <body> | ||
+ | <input type="submit" onclick="fillIt()" value="Add to div"></input> | ||
+ | <div id="array"></div> | ||
</html | </html | ||
{{:Team:Amsterdam/Footer}} | {{:Team:Amsterdam/Footer}} |
Revision as of 15:03, 9 September 2011