Questions tagged as 'javascript'

2
answers

How can I copy and paste on a screen?

Personal greetings, I have a generic javascript util.js file with a function to not allow copy and paste. $('input').bind('copy paste', function (e) { e.preventDefault(); }); On a specific page, I need a given field to copy and pa...
asked by 19.07.2018 / 20:25
1
answer

Check if cookie exists with JavaScript

I have a cookie set with javascript, I created it like this: document.cookie='gravado=sim' I do not know how to check if it exists. I need to do a check because if it does not exist, I'll redirect to another page, I also need to know how I...
asked by 19.07.2018 / 09:45
3
answers

Alert When Sending Email Successfully

I need help when the email is successfully sent a message appears in an alert (it can be another way), saying that it was sent successfully, so that user n has doubts about whether it was or not. Here is the code I have: HTML <form id="f...
asked by 19.07.2018 / 23:39
1
answer

Transform the results of an HTML form into HASH with JQuery and JavaScript

I'm trying to see the credit card hash informed to test with Moip, but my Javascript does not show me on the screen, it returns me [Object, Object], I would like to see the complete hash to pass to Moip. > PS: Moip's sample credit card link is...
asked by 26.07.2018 / 17:17
1
answer

Array counter with while in JS

I need to count the elements of an array using the while loop and display a alert() , but it is not displaying the count in the browser . Using for worked fine. I leave my code below: var deuses = new Array(); deuses = ['...
asked by 25.07.2018 / 15:24
1
answer

Use the select tag to change the content of the page?

I'm starting to use JavaScript and would like to know how to use select strong> chosen, the page shows me a different return ( its characteristics ). $(document).ready(function() { var ling = ["Java", "JavaScript", "PHP", "Python...
asked by 01.11.2018 / 12:52
2
answers

How to display / hide an input field from a select field? [closed]

I have a select with two options: 0 and 1 , when I select the 0 option, I need to display a field and when I select 1 , the field must be hidden. How can I get this result?     
asked by 01.11.2018 / 14:32
1
answer

Help with Header effects [closed]

Hello, I'd like to know how I can do this "drawer" effect, just like this site: link Please note that it appears with height and width 100% then decreases to the normal size of a header, I do not know how to do this with just CSS, I believe...
asked by 01.11.2018 / 18:08
2
answers

Use the contents of an input field in a JS function

I'm starting now in JS I have an input field: <input required type='date' name="data1" id="data1" class="form-control" /> Then I created a button that when clicking will get the contents of that field and put in another field...
asked by 02.11.2018 / 04:01
1
answer

Javascript Prompt

Does the prompt return by default String correct? The function Number does the return conversion of the prompt that is String to number. So when I run the following function and I put numbers in quotes does the message NaN...
asked by 12.07.2018 / 23:35