这是我的代码 - 它在一行中打印,但我希望它是多行的。请帮助
function display()
{
var divElements = document.getElementById("selection").innerHTML;
var oldPage = document.body.innerHTML;
document.body.innerHTML = "The Ninja Centre Order Receipt" +
document.getElementById("first").value +
document.getElementById("last").value +
document.getElementById("address").value +
document.getElementById("suburb").value +
document.getElementById("state").value +
document.getElementById("postcode").value +
document.getElementById("country").value +
document.getElementById("email").value +
document.getElementById("contact").value +
document.getElementById("selection").value +
document.getElementById("result").value
window.print();
document.body.innerHTML = oldPage;
}