Questions tagged as 'javascript'

3
answers

How to publish application made in Node.js

Well, I'm new to Node.js, I was able to set up an example application, learned a lot of Node with Express, but I can not figure out how to publish the application to the linux server. Does anyone know how to publish? I would have to create a pro...
asked by 12.02.2014 / 20:03
3
answers

JavaScript Access Modifiers

Situation function x(){ var f = null; // PROPRIEDADE PRIVADA DE x this.a = null; // AS INSTANCIAS DE x TERÃO ACESSO A PROPRIEDADE a x.b = null; // ACESSIVEL COMO x.a } function y(){ x.call(this); // HERANCA DE x t...
asked by 24.11.2015 / 15:33
3
answers

How to find "Happy Numbers" within a range?

I'm making an application where I need to find Happy Numbers within a certain range, in the case of 0 to 50, and found this in Wikipedia :    Happy numbers are defined by the following procedure.   Starting with any positive integer, the...
asked by 14.03.2018 / 01:13
5
answers

How to dim the blue light on a website?

I'm developing a website, and I would like to dim the blue light (as night mode), however, I have not found a way to do that. Is there a way for CSS, JS, or some other language?     
asked by 11.10.2017 / 09:09
6
answers

How to remove a "href" from a tag with JQuery / JavaScript?

I have a <a> tag with hyperlink properly set. However, I would like to remove it when firing from an event. The same tag has an ID set properly, also (unique, valid, and related). I would like to know if there is a function to re...
asked by 05.02.2014 / 19:57
1
answer

HTML5 print screen automatically

Is it possible or is there any html5 / javascript / jquery library that allows me to take a print out of the window or a div and save it automatically without requiring the user's permission? I've tried window.print() but it asks for u...
asked by 25.02.2014 / 15:06
2
answers

All keys work as enter

I'm developing a small system in PHP where the user just passes a badge and press enter. Somehow I need to make this enter automatic after a few seconds (the button is already in the focus after filling in the field) or when passing the badge ag...
asked by 24.08.2015 / 19:52
2
answers

Where should I declare an instance variable in JavaScript?

I'm in doubt about creating instance variables in a class / JavaScript constructor function. I have read in several places that the declaration of an instance variable is made inside the body of the class as in the example below: function Spam...
asked by 11.01.2014 / 15:33
2
answers

document.getElementById ('ID'). func (...) vs ID.func (...) [duplicate]

Yesterday I came across a curious thing , I had no idea what to do in this way. So far I've done it this way: document.getElementById('a').innerHTML = 'CONTENT'; <div id="a"></div> Always but always I have seen t...
asked by 24.01.2017 / 12:32
4
answers

Identify whether the device is a PC or cell phone and use a different code for each

I want it to be automatic if the person is on the computer, to display a code if it is on the phone, to display a different one. I do not want to change the resolution, but rather all the content presented on the page. Example: If it's mobile:...
asked by 01.06.2016 / 18:40