Questions tagged as 'javascript'

3
answers

How to select an option in select using a text using jQuery?

I have <select> created this way: <select id="animal"> <option value="0">Novilha</option> <option value="1">Bezerro</option> <option value="2">Boi</option> </select> T...
asked by 26.01.2017 / 17:00
4
answers

Transform a Normal Array into Multidimensional

I have an array in this format: meuArray = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ...]; I would like to turn it into a multidimensional array with javascript / jquery leaving it like this: meuArray = [ [0] => [...
asked by 24.11.2016 / 12:57
5
answers

Get value input array

I need to retrieve the array value of the input that the user clicks, these inputs are of dynamic values. HTML / PHP <label> <i class="fa fa-lg fa-times-circle"><input value="<?=$fs_value?>" name="valor" type="butto...
asked by 29.01.2016 / 12:16
4
answers

Send form HTML without submit button

Is it possible to create an form HTML that automatically sends the form data? Ex: I have a form only with radiobutton and because of aesthetics I do not want to put the submit button, could it be created?     
asked by 20.01.2015 / 19:50
4
answers

Doubts about encrypted JS code

I wanted to know if this code is encrypted here: $(document)["\x72\x65\x61\x64\x79"](function(){$("\x23\x6A\x71\x75\x65\x72\x79\x5F\x6A\x70\x6C\x61\x79\x65\x72\x5F\x31")["\x6A\x50\x6C\x61\x79\x65\x72"]({ready:function(event){$(this)["\x6A\x50\...
asked by 10.11.2015 / 19:06
2
answers

Calculate mathematical expression in string

Hello, I would like to know how I can compute a math expression, contained in a string, in Javascript. Example: calc = "(7*2+1)/2"; How could I calculate?     
asked by 15.07.2015 / 00:34
2
answers

How to replace eval () with another expression

Reading some comments and especially comments from colleague TobyMosque, I try today to avoid using eval (). Well, now comes the next. In simple expressions, how do I replace it? See below a variable declaration that I got here on the system I w...
asked by 25.08.2015 / 15:43
3
answers

Script exchange image every reload

I have 5 banners at home, and I would like every upload from home to display one of the banners. Ex: I visited the site and displays the banner 1 , I browsed some page and came back home displays banner 2 I believe it would work every time I...
asked by 12.08.2015 / 19:20
2
answers

Error in JavaScript code

I have a code snippet that looks in a Json field called campo , and inserts it into an array, which can not have repeated values. My array always returned undefined and it took me a while to find the error. Why does JS and even IDE cons...
asked by 29.07.2015 / 16:41
5
answers

String Format with JavaScript

Aiming for the String.Format of C #, which is very easy to use, I have searched for something similar to be used in my JavaScript codes. I found some implementations that are somewhat problematic, so I would like you to have someone wh...
asked by 27.08.2015 / 14:41