jquery - Javascript won't change page content -
This code was working fine when I was using the JavaScript Window prompt to input the length Has changed this to use a if
statement and a dropdown window, and it does not seem to work? It is trying to figure out where the problem is for a few hours, so if someone can tell me in the right direction then be truly grateful!
HTML:
& lt; Choose the name of the name "parasis" id = "parasis" & gt; & Lt; Option value = "small" & gt; Small & lt; / Options & gt; & Lt; Option value = "medium" & gt; Medium & lt; / Options & gt; & Lt; Option value = "big" & gt; Big & lt; / Options & gt; & Lt; / Select & gt;
javascript:
var getRekt = function () {var ipsumLength = 0 var number paragraph = document.getElementById ("paragraphs"). value; Var paragraph size = document.getElementById ("parasys"). Values; Var startRektIpsum = document.getElementById ("startRekt"). Checked; If (paragraph size === small) {(ipsumLength = 9); }; And if (paragraph size === medium) {(ipsum langil = 25); }; And if (paragraph size === large) {(ipsum langeline = 38); }; Var string = "quad epsom"; Var rektIpsum = [the array of words that I will not tell]; For (i = 0; i & lt; = ipsumLength; i ++) {(string = (string + "+ + recto.sum [Math.flur ((Math.rendum) * (rektIpsum.length)))))) }} GetElementById ("p1"). InnerHTML = (string);}
As stated in my observations, the problems were syntax ... but the solution could be.
var paragraphsimap = {small: 9, medium: 25, big: 38} var getRekt = Function () {var number paragraph = document.getElementById ("paragraph") value; Var paragraph size = ("Parasys" = ['', '', '']; (I = 0; i & lt; ipsumLength; i ++) {string + = "" + rectIpsum [Math.flur (Math.Random) * rektIpsum.length) ]} Document.getElementById ("p1"). InnerHTML = string;}
Comments
Post a Comment