browser - adding .value stops flow of javascript -


I'm in the middle of creating a program in the browser which defines the user's choice by using pre-objects Holidays I Tried to create an object to use in comparison to the selections of and selected the most matching holidays, although when I try to select the value (add .value) it starts breaking the flow of java , And Do not read the code even after reading.

  var ClimateWare = document.getElementById ('climate') /. Value \ var accVar = document.getElementById ('Insert Selection') /. Value \ var durationVar = document.getElementById ('period') /. Value \ var user input = new input (climate / value, \ accVar / .value \, duration / .value \); (Var key in user input) {var woo = userInput [key]; Document.getElementById ('some DIV'). InnerHTML + = woo / .value \; }  

without any .value / s, this [object HTMLSelectElement] null [object HTMLSelectElement] prints - (I have changed "getElementById" to "query selector" "Nalanulanal" prints). , But when I try to add Anywhere value, the whole script stops working, and so all this will not go away. Why add on the earth? Stop the story of value from work? Apart from this, nothing changed.

In addition to this, I am a newbie on this, it is a practice project, but I am stuck about it for a day.

I have tried to add the type I / I have typed everywhere, and it has the effect of stopping the code.

Are you really calling values ​​on legitimate objects? Object exists and support. Cost to get results - e.g.

HTML

  & lt; Input type = "text" id = "text input" value = "123" /> & Lt; Div id = "divHoldingInfo" & gt; 123 & lt; / Div & gt;  

javascript

  alert (document.getElementById ('textInput'). Value); Warning (document.getElementById ('divHoldingInfo') innerHTML.); Warning (document.getElementById ('iDontExist') value.); // errors were excluded  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -