Below I made 2 examples of how you can traffic the data using only HTML and javascript. These ways are not safe as anyone with more advanced web knowledge can change all this information...
If you intend to use some backend-oriented programming language, specify so you get a better answer.
To get a better look at the error, copy the codes and put them on a test page that you create.
1st - Passing parameters via url (Query Param):
Ex: http://www.minhaurl.com.br?valorPedido=10.00
A Function getParameterByName, copied this Question: https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript?answertab=active#tab-top
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
window.onload = function(){
document.getElementById('resultado').textContent = getParameterByName('valorPedido');
document.getElementById('tot').textContent = new Number(document.getElementById('resultado').textContent) + 5.00
};
<div class="container">
<div class="last-liner">
<p>Valor do Pedido: <span id="resultado" class="resultado"></span></p>
<p>Taxa de Entrega: <span id="txa" class="txa">5.00</span></p>
<p>Total: <span id="tot" class="tot"></span></p>
<button id="finalizar" class="btn btn-round" name="finalizar" type="button">Finalizar</button>
</div>
</div>
2nd Using Session Storage or Local Storage (Before implementing, check the browser support if it will suit you and most importantly, search and see which one suits you, Local Storage or Session Storage)
window.onload = function(){
//Esta linha abaixo grava a informação no browser do cliente, implemente na página que você tem o resultado e antes de alterar para a segunda página você usa esta linha
sessionStorage.setItem('resultado', 11.00);
//sessionStorage.getItem() traz o valor do item que você gravou na página anterior
document.getElementById('resultado').textContent = sessionStorage.getItem('resultado')
document.getElementById('tot').textContent = new Number(sessionStorage.getItem('resultado')) + 5.00
};
<div class="container">
<div class="last-liner">
<p>Valor do Pedido: <span id="resultado" class="resultado"></span></p>
<p>Taxa de Entrega: <span id="txa" class="txa">5.00</span></p>
<p>Total: <span id="tot" class="tot"></span></p>
<button id="finalizar" class="btn btn-round" name="finalizar" type="button">Finalizar</button>
</div>
</div>
What language can you use on the second page? PHP?
– user60252
Can be used php or jquery
– Harakin