Questions tagged as 'dom'

1
answer

Assign current date and time to DOM element

I'm trying to perform a horizontal slider in which, I have a 'p' tag to which I want to assign the current time and date, but if I do it in the jquery ready, which is when our page is already loaded or document, only the date of that moment woul...
asked by 21.03.2018 / 17:20
1
answer

php dom add an item

Hello friends, you could help me with the following. I have that HTML code: <figure class="class"><iframe src="src" width="xxx" height="xxx"></iframe></figure> But I want to add a iframe more so it looks li...
asked by 27.02.2017 / 23:35
3
answers

Get the selected select value - Javascript - DOM

I want to get the value (.value) or text (.text) of the chosen option from a drop-down list of a select in a form. How do I access the text of the selected selection? HTML code of the select element: <select name="provincia" id="pro...
asked by 22.05.2017 / 21:23
2
answers

html table with javascript

I want to get a table like the one in the picture, but the EFR and EFA titles do not fit well, and how to get the last row with a bit of space? I would also like to improve the code, it is a lot of code for a simple table var ta...
asked by 30.03.2018 / 01:29
2
answers

Delete JavaScript DIV elements

I'm trying to remove all the elements of the class cupcake from my dom to repaint them based on a filter. I'm doing; let cupcakes= document.getElementsByClassName("cupcake"); alert(cupcakes.length); for(element of cupcakes){ c...
asked by 05.12.2018 / 20:01
1
answer

btn.eventListener is not a function!

When I want to add an event listener to an html object, the eventlistener is not a function error appears in the browser console, the code is as follows. This script is executed in a simple html file. var btn = document.getElementsByClassName(...
asked by 28.04.2018 / 23:30
5
answers

Message on a label p

I want to show a message on a label in a login that if the user has not entered any data that shows a message that you have not entered anything in that tag this is the code that I am using: (function () { "use strict"; var iniciar...
asked by 29.07.2017 / 21:25
2
answers

JavaScript jquery selector in typescript

I'm learning to use typescript and I do not understand why it does not work initHideCookies = (function (selector:string) { //Hide Cookies $(selector).click(function () { $(".m_cookie").hide(); }); }) the $ (selector) i...
asked by 25.04.2017 / 15:00
1
answer

How to listen when the html tag changes?

My problem is as follows. I use vue and I need to know the language in which the app is located. <html lang="es"> When the language changes in the app I need to notice that change in an unrelated instance. Try this does not work...
asked by 12.12.2018 / 20:53
2
answers

Because I get Nullpointerexception when I save an attribute of a node

I am trying to show an XML file on the screen through the DOM, but after converting the aforementioned file, when I want to save the data of each node in a array I get the error: Exception in thread "main" java.lang.NullPointerExcep...
asked by 23.11.2018 / 14:42