Javascript: function and its argument -
I have a problem with my function and its The script is hanging in another cycle: It prints Note that this advice should be used for all things: arguments ... this code is: < / P>
function alab () {var up = arguments [0]; Var id = logic [1]; Lane = arguments Long-3; For (var an = 1; a & lt; = 10; a ++) {arg = (logic [2] + a); // id tag html: [nome] [num] document.getElementById (arg) .style.display = "block"; } (Var i = 3; i & lt; len; i ++) {warning ('test1'); Document.getElementById (argument [i]). Style.display = "none"; Warning ('test2'); } Change_price (above, id); }
'test1' , but does not print
'test2' . Where's the error? Thx all;)
(var i = 3; i & lt; len; i ++) {var node = document.getElementById (argument [i]); If (node) {node.style.display = "none"; In other words, if any element can be found if you are not 100% sure to be even more pedantic: i
Comments
Post a Comment