Posts by Leandro Lobo • 65 points
10 posts
-
-2
votes4
answers22787
viewsA: Sum Javascript Array
var array = ["1", "2", "3"]; // example of a basic array! var sum = 0; for (var x=0; x < array.length; x++) { soma += parseInt(array[x]); } // sum equals: 6…
javascriptanswered Leandro Lobo 65 -
-1
votes4
answers19850
viewsA: How to get the key pressed?
to pick up the letter itself is used iputs[x]. addeventlistener("keypress", Function() { console.log(Event.key) // if I click 'p' it will return me 'p' unlike the keycode that returns the key code…
javascriptanswered Leandro Lobo 65 -
0
votes1
answer13026
viewsQ: What solution to the error: "A non well Formed Numeric value encountered"?
function exemplo() { $premio = "Jose ganhou na lotérica 2.000.000,00 mais gastou 1.000.000,00 com quanto josé ficou? <br>"; echo $premio; $smtNumero = explode('na lotérica ',$premio);…
-
-1
votes4
answers18115
viewsA: Convert Array to String
Best way would be: $bMsg3 = array( $at1 = 0, $at2 = "", $at3 = 0.0, $at4 = 0 ); var_dump($newString=join(" ",$bMsg3));
phpanswered Leandro Lobo 65 -
2
votes2
answers47
viewsQ: Place event button to access page
How do I put the event button to access the following page: In Html: <a id="navMn">Blog</a> I have the following javascript code, which is in error: function abreOjnl(){…
javascriptasked Leandro Lobo 65 -
1
votes2
answers44
viewsQ: I’m trying to make a little picture slide
var cont = 0; var imgss = []; var refrescar = 1; imgss[0] = "../_imagem/primerr.png"; imgss[1] = "../_imagem/cab.png"; function contar (){ document.images.item(0).src = imgss[cont++]; if(cont == 1){…
javascriptasked Leandro Lobo 65 -
0
votes2
answers51
viewsQ: How to style css with javascript searching for classes
Aim and grab invisible text with css effect visibility: hidden; and through Avascript I want to pass a function that when I press a button all classes with visibility: hidden be visible. I…
-
0
votes1
answer631
viewsQ: How to make input content appear on Alert?
To illustrate what I want, it’s like I write something on input and when you press the button, appear, in the alert, the text I wrote. In Javascript: function myFunction (){ var input =…
-
2
votes3
answers91
viewsQ: Someone can explain to me the following situation:
pessoa = { nome: 'leandro', idade: '2' } for(x=0;x<pessoa.idade;x++){ console.log('Ola mundo'); // ele repete 2 vezes "Ola mundo" na tela } The question I have is that I thought that Javascript…
-
1
votes1
answer33
viewsQ: I’m trying to do a text input, and what I type into it I want to play within a variable?
<input id="a_input" type="text" > var b = Document.getElementById('a_input'). innerText = ''; //There are ways you can return to me what I typed in the Alert input to make it easier ??…
inputasked Leandro Lobo 65