Questions tagged as 'javascript'

3
answers

Avoiding line breaks in text areas [duplicate]

I have a normal textarea <textarea placeholder=" Digite aqui" class="form-control"></textarea> I wanted the user to press enter when he did not break the line, but already sent the content. Could you do this with a input...
asked by 21.12.2015 / 19:20
3
answers

Obtain the class name of an object

I want to get the class name of an SVG element. I have the following example, but I do not get your name: class_obj = document.getElementbyId("id").className; console.log(class_obj); Jsfiddle example: link     
asked by 27.01.2016 / 16:22
3
answers

JavaScript Method Overload Function

I'm reading a book called "Secrets of the JavaScript Ninja" and in it, I came across a method overload function. So far so good, I understood what it does, I understand that it makes depending on the amount of parameters passed to the function a...
asked by 02.10.2015 / 18:22
2
answers

If I call a JavaScript file, is this code visible in the browser?

I know that when I write code directly in HTML pages JavaScript is shown but what if I just call the file, for example, <script src="script.js"></script> Will the code be shown?     
asked by 06.10.2015 / 17:52
1
answer

How do you handle submitting a form only once?

In a Method POST form, when I click the button twice it quickly executes the submission twice. Solutions with javascript or with the spring framework.     
asked by 14.09.2015 / 16:24
3
answers

Why is the result of the textbox disappearing after the click?

I'm studying Javascript for a YouTube videotape I did the same video, but when I click on Calculate the result appears and already disappears in less than 1 second, when in fact it should stay in the field text. Below is the html and js. No...
asked by 11.10.2015 / 20:14
3
answers

Pass Javascript Variable into an Input text

In this code, I need to pass the variable Var url_atual into As I'm not aware of javascript I would like a little help on how I can do this function loginMeuSite() { var url_atual = window.location.href; var divLoginSite = document.getEle...
asked by 08.10.2015 / 22:11
2
answers

How to remove a Key from a JSON

Suppose the following JSON: {"id": 1, "preco": 100, "detalhe": "nenhum"} If I build an array with 100 of these objects and want to remove the "detail" key from all, for example, is it possible (without being in the hand)?     
asked by 14.11.2018 / 17:25
1
answer

What does it mean _: e _

What does _: e _ mean? in the definition of functions as in the example below. constructor(){ router.events.subscribe((_:NavigationEnd) => this.currentUrl = _.url); } I have many doubts about it.     
asked by 04.08.2018 / 16:36
3
answers

Select option from a select

I have the following HTML: <select id="faturamento-mes-referencia"> <option value="1">Janeiro</option> <option value="2">Fevereiro</option> <option value="3">Março</option> <option v...
asked by 10.02.2017 / 16:42