Questions tagged as 'javascript'

2
answers

Join in array creating elements?

We can imagine the following array : var arr = ["a", "b", "c", "d"]; I know I can use join(", ") to make it into a string type: "a, b, c, d" , but I would like to create an element for each array item, which would be type...
asked by 26.07.2018 / 18:06
2
answers

PDF view in browser

I'm researching a way to view PDF file in the browser and print it all over the web (This action will be done by the user). Someone knows some tool that works with this. I'm using PHP and MySQL in my project. My intention is that you look simila...
asked by 07.03.2014 / 13:06
1
answer

How to make a simple text editor with jQuery, PHP and BBCode?

How can I format text in a textarea with BBCode? Type, create a mini text editor with paragraph shortcuts, bold, center, these basic options, nothing very personalized.     
asked by 12.03.2014 / 05:34
2
answers

Get content of the src attribute in the img tag via javascript

I'm trying to make a password field, which when clicking an image next to it, will leave the password visible, and with that I also want to change the image when the click occurs. My HTML looks like this: <img src="~/Imagens/olho.jpg" s...
asked by 06.06.2018 / 16:38
1
answer

JavaScript compiled in browser

Is there a way to compile JavaScript code and distribute it along with the other files in the site instead of distributing the source code itself? As in Java it compiles to bytecodes , so you distribute your bytecodes and not the source code i...
asked by 31.05.2018 / 16:40
2
answers

Use of two Onsubmit in JavaScript and Function If within an alert

I'm training JavaScript with HTML and CSS and I'm creating a simple web page where I will calculate BMI. My user, besides informing his weight and height, email, phone .. By JavaScript I must perform the IMC calcul...
asked by 11.06.2018 / 16:21
1
answer

Attribute Async and Defer Javascript - Async pause rendering?

I was reading again, about async and defer. I noticed that Async, although loading the script asynchronously, after loading, the HTML is paused to execute the script. Defer would work as an Async, but script execution is done after HTML rende...
asked by 04.06.2018 / 00:54
3
answers

Take part of the field value

Hello, I need to get some of the input value function exibir(){ var elem = document.getElementById("campo3").value; var sel = document.getElementById("campo4").value; document.getElementById("demo1").value...
asked by 04.05.2018 / 21:49
1
answer

Copy content button, and display a message shortly after you click it to copy

My case, I want to make a button to copy the short link of a site, ie do not need to display the text, just have the icon of fontawesome <i class="fas fa-copy"></i> ie a button with the icon, without showing the text with the...
asked by 30.04.2018 / 05:37
3
answers

Hide part of string

I need to display only part of the string and when the user clicks the link, show the entire string as the example in the image below.     
asked by 03.01.2018 / 23:09