0
I have this line which is a part of the code I’m using to send the data through the URL:
<a href="curso.html?id=' + item.id +'&descriacao=' + item.descricao + '"
class="a-item">'+ item.nome +'</a></div>
Is passing normally.
I have the code that captures the URL data on the other page:
var query = location.search.slice(1);
var partes = query.split('&');
var data = {};
partes.forEach(function (parte) {
var chaveValor = parte.split('=');
var chave = chaveValor[0];
var valor = chaveValor[1];
data[chave] = valor;
});
Now how do I insert this data into the view? I’m using pure js.
want to take the data from the url and insert in tags, type <p>
– Francis Vagner da Luz
I can’t imagine how
– Francis Vagner da Luz