Questions tagged as 'javascript'

1
answer

Is there a method to remove a substring from a string?

For now I use the replace method for this but I wanted to know if there is an exclusive method to do this: pontos = '${parseInt(pontos) + aposta}${pontos.replace(parseInt(pontos), "")}';     
asked by 28.09.2017 / 15:23
1
answer

VueJS v-select submit

I am using V-SELECT to do a select style Chosen . Well, it works! But when I use "ENTER" to insert new elements, it gives SUBMIT in the form. Is it possible for me to give submit only when I click the button and not when givi...
asked by 29.09.2017 / 17:59
1
answer

javascript does not create html element and does not add to the page

I'm starting in javascript and wanted to create html elements dynamically but when I load the page it goes blank and does not add the elements code below: function add (){ var texto = document.createTextNode("teste"); var p = d...
asked by 02.10.2017 / 17:19
2
answers

Result automatic calculation javascript asp.net mvc [duplicate]

I was able to sum the two fields using Java Script, but the result only displayed when clicking the result field, I would like to display the result automatically, without having to click anything. Javascript <script type="text/jav...
asked by 26.09.2016 / 15:18
2
answers

Button show div 1 and hide div 2 and vise versa

I want to make a single button that changes its name and hides div1 and shows div2 . The button would have the name div1 when it was showing div1 and the same default for div2 . function mostrar_abas(obj...
asked by 15.09.2016 / 01:28
1
answer

How to "concatenate" JavaScript functions?

How does lib jQuery do? Example: $ (element) .text ('my text'); I want to know how to do a function like text() in pure JavaScript, just to learn the theory. I want to know how the html element is passed as a parameter to the tex...
asked by 29.09.2016 / 20:46
2
answers

Replace all characters with "_" except the 1st character of each word

I want to replace a sentence with all characters with _ except the 1st character of each word in JavaScript.    Q
asked by 20.09.2016 / 01:07
1
answer

Check if a value is inside an array

I would like to do the following: The user enters his zip code and a input field and the value that he inserts into this field wanted to compare if he is in the zip code range (01000 to 19999) p> My questions: 1st - In case I would...
asked by 23.12.2016 / 16:35
1
answer

Problems with XMLHttpRequest in Chrome

After this update of Google Chrome for version 53, I am facing problems in the Ajax (jQuery), $ .http (AngularJS) and XMLHttpRequest (Javascript) calls with the following message: XMLHttpRequest cannot load *. Response to preflight request doe...
asked by 14.09.2016 / 21:46
1
answer

Is it possible to manipulate a template from an abstract route, in other routes, dynamically?

At angular I created an abstract route using $ stateProvider. This route is where you have the side navigation menu and two toolbar, one with some buttons, and another one of search. I created an abstract route with the idea of reusing som...
asked by 15.12.2016 / 11:37