Questions tagged as 'javascript'

1
answer

ES6 and addEventListener (). Why does not this method take reference to an anonymous function?

Why is the 'click' not invoked? $elemento.addEventListener('click', click, true); var click = () => { ... };     
asked by 02.02.2017 / 13:51
1
answer

How to make a "link format" (a system that reads the content of other websites)? [closed]

I would like to integrate a facebook-like system for reading external links in my project. Type when posting a "www.un-site-qualquer.com" link on my site I would like to get a result like the picture below!     
asked by 23.01.2017 / 08:58
1
answer

Receive input code

How do I treat input text as string even though they are html tags? Ex: if I type <b>texto</b> In an input field without treatment it appears so text , but I want it written anyway: <b>texto</b>     
asked by 23.01.2017 / 14:38
1
answer

How to leave CEP form sliding the same as ifood's website? [closed]

This is the form of the site I want to change: artnaweb.com.br/pediragua Leave this same: ifood.com.br I do not understand Jquery. I have knowledge only of HTML and CSS. Thanks!     
asked by 03.02.2017 / 01:16
3
answers

How to leave the OPTIONS list of a SELECT with transparent background?

My form has the inputs with placeholder in white and background transparent, to make everything uniform I need to put the select field in the same style; background transparent and font white, however if I use; sel...
asked by 19.01.2017 / 14:49
2
answers

Focus on the last character Jquery

I need that when the field receives the focus, the cursor stays on the last character. The way the cursor is is at the beginning of the field even though the field is not empty. function gravaObs(unidadeObs) { var gasObs = $('#obsGas_'+uni...
asked by 19.08.2017 / 23:14
1
answer

PDF corrupted after download?

I am generating PDF's of the data I have in a table in my client, I send the data to the server and there the PDF is generated. After it is ready, the PDF is downloaded, and it is at this stage of the process that it corrupts. However, if bef...
asked by 15.08.2017 / 20:19
3
answers

Doubts Javascript Alert

I was looking for a function to display an alert message to the user when he left the page and located this one in the forum: <script> // Script de Alerta ao fechar a pagina... window.onbeforeunload = fecharJanela function fe...
asked by 18.08.2017 / 15:02
1
answer

Stacking and stacking with queue in javascript

I have to stack 3 values that are entered by the user through the prompt, and then unpack, showing the result on the screen. The problem is that after the user types the 3 values, the following word appears 3 times, instead of the values:...
asked by 08.10.2017 / 02:13
1
answer

Execute function when clicking on any type element

I want you to click on any link [element 'a'], something happens. I have tried the code below, with getElementsByTagName but I did not succeed. document.getElementsByTagName("a").onclick = function() { document.getElementById("lo...
asked by 09.10.2017 / 00:28