Questions tagged as 'javascript'

3
answers

Avoid Nan in a javascript code

I have this code but if I do not enter a value when executing the script I see NaN , I would like it not to appear and it will show me an alert that the field is empty. function descuento() { var n1 = parseInt(document.calcul...
asked by 03.09.2018 / 22:05
3
answers

How can I validate with regex that a question was asked?

How can I validate with regex that a question was asked? Is it possible? example: var text = "¿cómo estas hoy? pareces cansado" text.match(/([¿?]).*/)     
asked by 01.09.2018 / 15:11
3
answers

Download .TXT from HTML

How do I click on the test button to run the script and download the information, Thanks. <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title>...
asked by 14.08.2018 / 23:31
2
answers

Apply CSS to array of objects in JSON

I need this array of objects in JSON <script> var galeriaOriginal={"frases":[{"persona":"Bender Bending Rodríguez","frase":"Los robots no tenemos sentimientos... y eso me pone tan triste...","foto":"http://www.topimagenes.net/wp-content/...
asked by 20.02.2018 / 20:56
1
answer

Error in HTML5 Calculator: TypeError: Can not set property 'onclick' of null

I think the problem is in the declaration of variables the code is not yet complete because it lacks functions to assign but the basic functions are not working for me: addition, subtraction, multiplication and division. with them the numbers. P...
asked by 21.02.2018 / 20:58
3
answers

Replace, by. to the flight with javascript

I want that when typing one, I change it for a. in an input that only accepts numbers. For the moment I have managed to get the input to only accept numbers, but I need the part to change the, for a point But I'm a little Lost with the subject....
asked by 21.02.2018 / 16:45
2
answers

how to change the value of a variable that is out of all the functions in javascript?

** hello someone can help me I have a question as to how I can change the value of a variable that is outside all functions but only in a function I want to call it to change the value this is an example of what I want to do var numero =1; fun...
asked by 15.03.2018 / 19:16
2
answers

Add another zero to the result

I have the following code and I need that for example, if in the first field I enter 10 and in the second 20 , it shows me:    0.5 USD but I need you to show    0.50 USD <form oninput="x.value=parseFloat(peso.value)/parseFloat...
asked by 29.06.2018 / 01:31
2
answers

Autoplay does not play the video

I have a question with the following code <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Video</title> <script type="text/javascript"> function iniciar() {...
asked by 11.06.2018 / 13:50
4
answers

Disable the dates in fullcalendar

I am using the FullCalendar library and I need to disable the days that have already passed but I do not know how to do it. I want to be able to enter the page does not allow me to click on the dates that have already passed. This is my co...
asked by 04.07.2018 / 19:58