Questions tagged as 'dom'

1
answer

Is "new DOMParser" safer than "document.createElement"?

I created a script to try to remove unsafe content at the time of injecting DOM (I'm using in extensions / addons for browsers): var str = "<strong>Hello</strong> mundo <script src="http://site/badscript.js"></script...
asked by 30.05.2016 / 18:54
1
answer

Is the 'window' rendered by the gift or does it come before that?

A curiosity: I wonder if the window is rendered by dom when loading the window, since the document is usually window.document.html . Or does dom come after this parameter?     
asked by 13.04.2016 / 15:37
1
answer

How to replace the HTML content of a div using DOMElement of php

I'm trying this way libxml_use_internal_errors(true); //pegar o conteudo de um pagina web $doc = new DomDocument(); $doc->loadHTMLFile('http://www.astralsaudeambiental.com.br/'); $div = $doc->getElementById('sidebar'); $string_div = '';...
asked by 25.07.2014 / 21:52
2
answers

Placing scripts and css links in an html document

I've always put the scripts and links to the CSS at the top of the document in the head of the document. Now I realize that there is another concept in which the calls to scripts and CSS are at the bottom of the document html , in the last...
asked by 11.06.2014 / 18:57
1
answer

How does the process of rendering web pages by the browser work? [closed]

I know the DOM tree exists, but I do not know how rendering works. I know that learning this is important.     
asked by 05.03.2017 / 04:18
3
answers

By what means can you remove dynamic cell inserted in the HTML table

Script var opt = document; function inserirLinha(id) { var newRow = opt.createElement('tr'); newRow.insertCell(0).innerHTML = '<input type="button" value="X" onclick="removeLinha(this)" />...
asked by 03.06.2018 / 16:05
1
answer

Add properties to element [Node]

Is there a problem in adding custom properties directly to the [Node] element? For example: document.getElementById('minhaDiv').minhaPropriedade = 'teste'; I'm using Firefox and have had no problems setting up or getting ownership, but is i...
asked by 23.01.2015 / 17:48
1
answer

How to know if the passed object is a DOM element?

I'm working with functions in which I must pass ( Mandatory ) a DOM element. This function will work with the properties of this DOM element. Example function changeValue(elem, value){ elem.value = value; } var input = document.g...
asked by 21.11.2016 / 19:09
2
answers

How to return a part of a string (an html element) in php?

I am making a "technical resource" to be able to return the status of the SEFAZ servers issuing invoices using PHP. For this, I have so far the code below: function get_content($URL){ $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNT...
asked by 23.12.2015 / 03:15
1
answer

What is DOM Parser?

Reading about regular expression I saw a recurring term, DOM parser, and I had the doubts: What is DOM PARSER? How does it work? Does any language have?
asked by 25.01.2017 / 02:30