I am making a very simple game in html and javascript, the idea is that the user put the result of each operation, and if it is right, an alert appears for him. I wanted to use a table because I want to exercise this. The program is almost done,...
Let's suppose I have an array like this:
$matrix = [[0, 1, 1, 0],
[1, 1, 1, 0],
[1, 0, 0, 0]];
Imagine that you are looping and capturing the position of this array as in the example below, y lines with my arrays and...
I have a simple screen, where I have already been able to create elements dynamically, with the click of the button, these elements are draggable up and down, and are two different elements, a textarea and a img that are added dyna...
Hello everyone.
I have two distinct function callbacks that give me values that need to be used outside of these functions. Here is the code:
FB.api('/me', function(response) {
FB.api('/me/picture?type=normal', function(response) {...
Hello guys, I was wondering if anyone knows any solution how to do a combination of css classes using javascript or jquery?
What I would like is to have links and each of these links have several classes of color, and after selecting one of t...
I have the site with 9 checkboxes, each associated with a div. When a checkbox is selected, the div related to it is shown. When another checkbox is selected, the div related to that other is also shown. For example, chkCamp1 shows optCamp1. chk...
I'm trying to test the "FIZZBUZZ" which consists of the following:
Write a program that prints the numbers from 1 to 100. But for
multiples of three print "Fizz" instead of the number and for the
multiples of five print "Buzz". For num...
I have a html table of 3 columns, the first 2 are <input type="number"> and the third is text.
I want to play in the third the sum of the values of inputs using onchange , but what I am facing is that if I put "2" in...
Direct question: What is the best way to save a JSON file locally and how to do it?
Details: I have a web application that receives user data using the Facebook API (Javascript SDK), I need to save this data to a JSON file locally. After sa...
I am here a code in js that when selecting a checkbox it displays the value of the checkbox in an input and if I select more than one it adds the selected checkboxes and displays the total value also in the same input
My problem is this, the tim...