Questions tagged as 'dom'

4
answers

How do I get the entire HTML of the last Fieldset in a dynamic page?

I have a div where multiple fieldsets and just below hr : Thedivcontentisdynamicandmayhave3ormorefieldsets.InmycodeIcouldonlygetthecontentthatisinsidethefirstone.HowcanIgetthewholefieldset?Hereisthecodeformypage:<html><head>...
asked by 29.12.2016 / 15:19
1
answer

javascript does not create html element and does not add to the page

I'm starting in javascript and wanted to create html elements dynamically but when I load the page it goes blank and does not add the elements code below: function add (){ var texto = document.createTextNode("teste"); var p = d...
asked by 02.10.2017 / 17:19
2
answers

How to implement an SVG?

Well, SVG is very important to the web since it's vector and I can resize it at will. It is an image format written in xml and is one of the image standards for web. But when I try to implement it on a web page, it just does not obey me! It stic...
asked by 24.04.2014 / 14:01
3
answers

Check if there was POST with Javascript

I have a singlepage application, and I would like to monitor POST for a webservice. When I send the information it removes the loading. ex: scope.deleteFile = function (fileId,index) { scope.loading = true;...
asked by 18.11.2014 / 15:52
1
answer

Totalize column values of an HTML table, with decimal result

I need to display the total result by adding the values that contain the value column: var linha=document.getElementsByClassName("calcular"); var resultado=document.getElementById('total').innerHTML = 0;...
asked by 02.06.2018 / 19:27
1
answer

How to manipulate a span element using pure JS

My question in this exercise is how to keep my total points fixed, because whenever the function is executed the value changes and it automatically returns to the value 100. So how should I manipulate this span? Or was my approach very wrong in...
asked by 27.03.2018 / 19:56
1
answer

When can the setSelectionRange method of HTMLInputElement be used?

Studying the structure of an element HTMLInputElement I got to method setSelectionRange , which makes the text selection between the positions defined by the parameters, ie input.setSelectionRange(0, 8) will select the c...
asked by 18.10.2017 / 15:49
1
answer

How to detect changes in the Document Object Model (DOM)

Every change in the DOM (Document Object Model), whether it is an inclusion, deletion or even a modification to some element I would like to perform a function, is there any "simple" way of doing This? If there is no way to detect such spec...
asked by 10.03.2017 / 13:01
2
answers

how to access the array of classes with jQuery? Catching the second class of an element

I'm listing the icons of a list in console.log() they are displayed, however I want to capture only the second classes of the icons in a variable, but I do not know how to access the second classes of the <i> tag with jQuery....
asked by 24.07.2018 / 01:01
2
answers

Turning a value of a variable into a paragraph

I want to know how I can, instead of sending the result of the pro alert function, create a paragraph, for example. Remembering that this doubt is to help me with future projects, so I am putting a very simple code. Code: <!DOCTYPE html&...
asked by 07.02.2018 / 01:02