Questions tagged as 'javascript'

1
answer

How to change background color according to value

I have created a script to count characters of a textarea in JavaScript, the code is this: <div> <p class="texto-cont">Restam <span id="cont">2.200</span> caracteres</p> </div> fu...
asked by 25.10.2018 / 07:51
2
answers

Show button when checking checkbox

I need to mark the checkbox submit button. But as I have more than a checkbox when clicking on the second to mark the button, I would like it to continue to appear until it has no checked. How can I fit my code below for my need...
asked by 25.10.2018 / 18:56
1
answer

Javascript converts string to int when passed as function parameter

I have the following excerpt: "onclick=relatorio("+dados[i].cnpj+")" data [i] .cnpj is a String variable, or at least it needs to be this way, however JavaScript converts the function parameter to a type number logo: function relatorio(...
asked by 25.10.2018 / 20:19
1
answer

How do I update a screen variable in React-Native?

I have my following page: import React from 'react'; import { ScrollView, StyleSheet, Text, Button, } from 'react-native'; export default class ArticlesScreen extends React.Component { constructor(props) { super(props);...
asked by 04.10.2018 / 19:32
2
answers

How do I update a page at a set time?

I need to refresh a page every 15 minutes, but with a set time (HH: 00 | HH: 15 | HH: 30 | HH: 45). I tried to do this ... <script> $(document).ready(function () { // Handler for .ready() called. windo...
asked by 07.12.2018 / 12:44
2
answers

Catch custom data-attribute attribute within a loop

I want to select all custom attributes and do a validation with them, but I do not know how I can get the value of "attr" inside a loop, since they are being iterated. HTML example: <input type="text" data-selected="teste" value="fulano"...
asked by 09.12.2018 / 16:20
2
answers

Get first item from each object in a JSON response

I'm getting a json through the following URL: link (via GET) I'm iterating over objects, but I wanted to get only the first item of each object, which in this case would be URL. How do I do this? axios.get("http://jsonplaceholder.t...
asked by 24.12.2018 / 22:25
1
answer

How to increase the distance to display icon that expands menu

I'm in an MVC 4 project, using bootstrap, and I want to know if I have to tweak the configuration so that the button that expands the menu appears on some larger screens. Thus: link There is some distance where that menu button appears,...
asked by 25.04.2014 / 20:11
2
answers

Use value of a select with JavaScript

I need to use the value of a select in an if, I currently have this: Esse seria o HTML: <p>Quantidade de vidas? </p> <select> <option value="vidas1" id="vidas">Mais 1000</option> <option value="...
asked by 11.12.2018 / 19:03
2
answers

Pass parameters by jquery to controller

I have a method in the controller (void) that receives some parameters (3). I can not get into the method. Of the other times I did, passing to an object there, I have succeeded, with method returning a json. Well, this is a void method and I do...
asked by 18.06.2014 / 18:08