Questions tagged as 'javascript'

3
answers

How to get the user's IP via Javascript?

I have three commands that together return the user's IP. I wanted to turn them into a single command with the command return . Like this: return userip; How do I? Here is the code: <html> <body> <script type="t...
asked by 07.12.2016 / 14:56
3
answers

Javascript - Make article appear when clicking on a li

I have a small question in my project that I am developing. I need to make certain <article> appear when a particular <li> is clicked.    Example <li> 's <li id="menu-CARD">USAR CARD</li&g...
asked by 28.09.2016 / 08:29
3
answers

How to redirect the site when it is a mobile?

I have the following code that should work, but in mobile it does not work in the chrome browser: var permitir_mobile = true; var mobileUrl = 'http://m.meusitemobile.com.br'; $(document).ready(function() { var e = window; redirectIfWi...
asked by 28.07.2016 / 14:34
2
answers

How to read a large line-by-line file with Javascript (nodejs)

I have a very large file to import data into MongoDB via Javascript. The problem is that I can not load the entire file into memory. I would like to read this file line by line, since each line is a record to insert into my bank. I know the f...
asked by 01.01.2015 / 01:16
3
answers

How to validate an input?

I have a form that sends the values entered in input to another page. I want to make a validation between the inputs, if one number is greater than another, and if not, do not go to the second page and warn with alert . Here is m...
asked by 12.01.2015 / 12:16
2
answers

How to move one element to the other's position with JQuery?

I have an element and want it when the user hover over it, it should go to the position of another element. For example: I have the element A and I have the element B , when the user moves the mouse in the A element, I nee...
asked by 13.02.2015 / 18:29
3
answers

How do I get Local Storage to expire?

I have a certain scenario where I need the user to be login and stay connected for some time. However, if page inactivity is detected after a time, perhaps 20 minutes, the < Local Storage invalidating the saved information. To set a va...
asked by 22.01.2017 / 19:22
2
answers

Adding values between html and javascript inputs

Dear friends, I'm trying to add sum between html and javascript inputs, but with this example, I've just been able to put in the html input. How do I implement in the javascript input and add the value along with the Total Value? NoHtmllooks...
asked by 19.12.2016 / 16:14
1
answer

Is there a way to create a parallel execution using javascript? [duplicate]

I wanted to know if there is a way to use parallelism in javascript . For those who come from the world of java or C this is a well known and used term, the known threads .    Parallelism = > is a program with t...
asked by 21.01.2017 / 14:30
2
answers

Script to select only one checkbox?

I have the following code with a menu of type Accordion menu : function marca() {} body {font-family: Trebuchet MS;margin: 0px;} nav {width: 100%;} p {font-size: 14px;text-align: justify;} .item label {font-size: 14px;color: #333;heig...
asked by 15.03.2017 / 17:27