html - 2D array improperly filled and undefined in JavaScript -


I am writing a function with two sub-functions: print a 2D head with two values ​​in the form To print the 2D array, at this point, I am trying to use the variable with integer values ​​to fill 2D array, but they are not being filled properly < P> After creating 2D array in any way, I can test the 2D array 'Two Deere' to print Try areas do, but it's undefined comes up?

  function isalid (frm) {var xValue = document.getElementById ("X") value; Var yValue = document.getElementById ("Y"). value; If (excl   

I have created a jsfiddle account, but it does not work the same way on the site:.

Fix:

  function isValid (frm) {var xValue = document.getElementById ("X") value; Var yValue = document.getElementById ("Y"). value; Var Length of 2 Dares = (yValue - xValue); Var twoDarray = new array (lengthwise 2dir); If (excl    

are being undefined on you two stars because the array is declared and created inside gen2Darray () but you are trying to access it from print_2d_string_array () . If you enter your var twoDarray = new array (); You should solve the undefined error of xValue and yValue announcements

  function is valid (frm) {var xValue = document.getElementById ("X"). Values; Var yValue = document.getElementById ("Y"). value; Var length 2 hours; Var twoDarray = []; If (excl    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -