Questions tagged as 'javascript'

1
answer

Send data in json format to php

I know that sending json from PHP to JS is totally viable, but is it possible to send my data via json ajax to PHP?     
asked by 18.12.2015 / 12:05
3
answers

Get the name of the Image in the URL

I need to get the image name in the url. /data/data/com.intel.appx.IZICondominios.xwalk15/files/_pictures/picture_006.jpg I need you to come back:    picture_006.jpg The URL template is not fixed, every situation can change. You can...
asked by 19.12.2015 / 17:50
1
answer

Is there a problem with using HTML5 attributes instead of jQuery or JavaScript?

Is there a security problem or something like using only attributes such as required in% with% s, among others instead of jQuery? Or is it just some option to use jQuery to customize the message only?     
asked by 16.12.2015 / 05:21
1
answer

How to save what is typed on the screen in a variable

I have a web page, and sometimes users press some numbers. However, I have a usb reader, which when I read a code it automatically shows me 7 numbers, as if I had typed them on the webpage. How do I save these 7 numbers that are "typed" im...
asked by 19.12.2016 / 17:43
3
answers

How to detect a mobile device in Javascript?

I have a web application with AngularJS, where I need to know if the user is on a mobile device to improve their experience, putting buttons to make calls, send messages, etc. I have a directive that will display an element from this test:...
asked by 04.04.2017 / 18:52
2
answers

How does the Javascript history object work?

I wonder if there is a limit of URLs to be retrieved or not, does it have access to the entire history?     
asked by 11.01.2017 / 12:20
1
answer

What are the differences between properties and attributes in HTML?

When attempting to use this code: $(document).ready(function(){ $("#selectAllBoxes").on("click", function(){ if(this.checked){ $('.checkBoxes').each(function(){ $(this).attr("checked", true); }...
asked by 27.05.2017 / 05:58
2
answers

How does Facebook write colorfully in the browser's console?

I need to do something like the image below: You can see it when you enter the browser console by accessing any Facebook page. I tried to insert HTML into the console.log() function, but it was in vain. Any tips?     
asked by 30.11.2017 / 21:56
1
answer

With an iterator / generator in javascript?

In PHP we have the Iterators and the Generator . Example Iterator: $f = new FileSystemIterator(__DIR__); foreach($f as $file) { echo $file->getFilename(); } Example Generator: function sequence($start, $end) {...
asked by 08.10.2015 / 17:06
4
answers

Swap text by clicking on it to show / hide an element

I have the following example made in JavaScript, of which is a text written "See more", that by clicking on it you are enabled to see more text: JSFiddle Example Code <head> <title> Javascript demo - expand/collapse t...
asked by 20.02.2014 / 11:18